一、如何生成报告
1、
输入:python3 -m pytest src/testcase/login --alluredir report/testdata
返回:===== test session starts =====
platform darwin -- Python 3.7.4, pytest-4.4.1, py-1.8.0, pluggy-0.9.0
rootdir: /Users/xxx/Downloads/Project
plugins: allure-pytest-2.6.2
collected 2 items
src/testcase/login/test_login.py . [ 50%]
src/testcase/login/test_logout.py . [100%]
===== 2 passed in 76.66 seconds ======
2、
输入:allure generate report/testdata -o report/testreport --clean
返回:Report successfully generated to report/testreport
3、# Starting web server
输入:allure open -h 127.0.0.1 -p 8083 report/testreport/index.html
返回:Starting web server...
2020-09-24 17:43:06.277:INFO::main: Logging initialized @371ms to org.eclipse.jetty.util.log.StdErrLog
Server started at <http://localhost:8083/>. Press <Ctrl+C> to exit
4、浏览器查看报告
查看方法1:手动点击index.html,使用浏览器打开进行查看
查看方法2:浏览器直接输入:http://localhost:63342/Project/report/testreport/index.html
二、生成的报告是什么样的