httprunner3+allure(Mac)

前期准备

1.httprunner已安装

2.下载allure相关包

 

 

brew install allure

pip install allure-pytest

pip install pytest

查看是否安装成功:allure --version

3.已经有httprunner项目

在需要存放httprunner项目的路径下运行:httprunner startproject httprunnerProject

 

开始生成自动化测试报告

httprunner会有默认的用例供我们使用

在pycharm的命令行输入:hrun testcases --html=reports/repost.html

会调用httprunner自带的用例报告

 

 使用allure生成测试报告

在项目路径下输入:

hrun testcases --alluredir=report

allure generate report -o allure-report --clean

 

 

 

posted @ 2021-07-14 17:09  默晓梦  阅读(137)  评论(0编辑  收藏  举报