HAF

The User Guide

This part of the documentation, which is mostly prose, begins with some background information about Haf, then focuses on step-by-step instructions for getting the most out of Haf.

Advanced Usage

https://travis-ci.org/hautof/haf.svg?branch=master https://raw.githubusercontent.com/tsbxmw/haf/master/docs/show/all.gif

How to get it

  • using pip to get it

    • tsbxmw@ps# pip install haf –upgrade
  • using git tool to get it

How to run

  • run api case

    python -m haf run -c=config.json

  • run web ui case

    python -m haf run -c=config-web.json

  • 3 find the report at the data dir

    using chrome or other browsers to open the html file

Others

  • local bus mode, using local bus to run all cases

    local bus is without –bus-server(-bs) args, when running the program, the bus would be created

  • modify the config.json in testcases

    change the log_path and report_path and case_path to your own path:

    {
    "config":{
      "run": {
        "log": {
          "log_path": "D:/workspace/mine/python/haf/data"
        },
        "bus": {
          "only": false,
          "host": "",
          "port": "",
          "auth_key": ""
        },
        "report": {
          "report_path": "D:/workspace/mine/python/haf/data/report.html"
        },
        "case": [
          {
            "case_path": "D:/workspace/mine/python/haf/testcases/test.xlsx"
          },
          {
            "case_path": "D:/workspace/mine/python/haf/testcases/test2.json"
          },
          {
            "case_path": "D:/workspace/mine/python/haf/testcases/test1.xlsx"
          },
          {
            "case_path": "D:/workspace/mine/python/haf/testcases/test3.yml"
          }
        ],
        "runner":{
          "only": false,
          "count": 4
        },
        "loader": {
          "only": false
        },
        "recorder": {
          "only": false
        },
        "web_server": {
          "host": "",
          "port": "",
          "run": true
        }
      }
    }
    

    }

  • create testcase

    create xlsx/json/yml file with template in testcases/

  • run

  • run with config:

    python -m haf run -c=./testcases/config.json
    
  • run with args:

    python -m haf run -case=./testcases/test.xlsx,./testcases/test2.json -ld=./data -rh=true -rod=./data/report.html
    
  • other run args
  • run with multi-runners (4 runners):

    python -m haf run -rc=4
    
  • run with web server:

    python -m haf run -ws=true
    
  • run with only-mode:

    # only loader
    python -m haf run -ol=true
    # only bus
    python -m haf run -ob=true
    # only runner
    python -m haf run -or=true
    # only recorder
    python -m haf run -ore=true
    
  • web api server suport
https://raw.githubusercontent.com/tsbxmw/haf/master/docs/show/report.gif

The Community Guide

This part of the documentation, which is mostly prose, details the Haf ecosystem and community.

Frequently Asked Questions

This part of the documentation answers common questions about Haf.

Platform Independent

  • Windows support
  • Linux support

Python Version Dependent

  • Support : Python 3.5 +
  • No Support : Python 2.X

Case Type Support

  • http api case support
  • web ui case support
  • app ui case support

Report Support

  • api report support
  • ui report support

Sql publish

  • mysql

HAF Framework

https://raw.githubusercontent.com/tsbxmw/haf/dev-2.1.0/docs/png/HAF-2.0.0.png

Loader

https://raw.githubusercontent.com/tsbxmw/haf/dev-2.1.0/docs/png/Loader.png

Runner

https://raw.githubusercontent.com/tsbxmw/haf/dev-2.1.0/docs/png/Runner.png

WebServer

SQL

https://raw.githubusercontent.com/tsbxmw/haf/master/docs/png/haf-publish.png

Bus

The API Documentation / Guide

If you are looking for information on a specific function, class, or method, this part of the documentation is for you.

Developer Interface

This part of the documentation covers all the interfaces of haf. For parts where haf depends on external libraries, we document the most important right here and provide links to the canonical documentation.

The Contributor Guide

If you want to contribute to the project, this part of the documentation is for you.

There are no more guides. You are now guideless. Good luck.