# -*- coding: utf-8 -*-
from httprunner.api import HttpRunner
from httprunner.report import gen_html_report

# 1、创建HttpRunner对象
# failfast当用例执行失败之后,会自动暂停,默认为False,可以不写
runner = HttpRunner(failfast=False, log_level='debug')

# 2、运行用例
# run方法支持如下参数:
# yml用例文件的路径
# 字典(用例的信息)
runner.run('testcases/custom/orderGreenCards/search_list.yml') # 可是任意可执行的yml
gen_html_report(runner._summary,report_dir="./reports/template") # 报告存放位置

相关文章:

  • 2021-11-13
  • 2022-12-23
  • 2021-10-02
  • 2021-06-22
  • 2022-12-23
  • 2021-06-24
  • 2021-10-03
  • 2021-11-19
猜你喜欢
  • 2022-12-23
  • 2021-06-17
  • 2022-12-23
  • 2021-07-25
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案