Foundation and installation may see these two articles, I will direct on how to use, do not understand you can refer to these two articles
https://blog.csdn.net/liuchunming033/article/details/79624474
https://blog.csdn.net/hh20161314/article/details/97292096
Use and effects
pytest Import Import Allure class Test_all (): @ allure.step (title = "Allure complete display of content by way of comment, setp means that the test steps ... 1") DEF test_setup (Self): Print ( "I am soy sauce Setup ") @ allure.step (title =" RUN is a normal way. ") DEF test_run (self): allure.attach (" custom description 1 "," description, custom ") Print (" I want to run ") the Assert True DEF test_skip (Self): Print (" I want to skip ") @ allure.severity (allure.severity_level.BLOCKER) # severity @ allure.testcase (" http://www.baidu.com/ "" test cases address ") @ allure.issue (" http://music.migu.cn/v3/music/player/audio "," click to jump to the bug address ") def test_error(self): with allure.attach ( "Custom Description 1", "I need to let him wrong"): print ( "my mistake") the Assert False
The first mode of operation, to generate data: pytest test_report.py --alluredir report
The second data generating reports: allure generate report / -o report / html
Generate a report file