1.pip install allure-pytest

 

2.执行时pytest xx.py --alluredir ./reportdir,会在该目录下生产reportdir文件夹存储测试报告

 

3.转化测试报告:allure server report