httpRunner流程图
2019-02-22 16:11:45 0 举报
httprunner
作者其他创作
大纲/内容
main-debug.py
task.pyinit_task_suite():initialize task suitetestcase.pyload_test_dependencies():load all api and suite definitions.load_api_file():load api definition from file and store in overall_def_dict[\"api\
启动接口服务:FLASK_APP=api_run.py flask run
task.pyHttpRunner类__init__方法:initialize test runnerHttpRunner类run()方法:start to run test with varaibles mappingreport.pyHtmlTestResult: generate formatted html results.
cli.py:main_hrun()1、导入argparse模块2、创建解析器对象ArgumentParser,可以添加参数。3、add_argument()方法,用来指定程序需要接受的命令参数4、parse_args()方法实际上从我们的命令行参数中返回了一些数据
运行测试用例:hrun entrytaskTestCase01.json
开始
runner.pyrun():Run the given test case or test suite.report.pyget_summary(result):get summary from test result
结束
0 条评论
下一页