自动化测试 | allure 安装教程 | allure 生成测试报告
1、allure官方下载地址:
https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/
2、解压压缩包。将 bin 目录配置的系统环境变量 path 中。
3、在cmd中输入:allure,不提示 allure 不是内部或外部命令,说明allure已经配置好了。
4、在pycharm的终端输入pip install allure-pytest 安装allure-pytest插件即可。
allure generate ./json -o ./report --clean 当你要生成报告的数据在输入命令目录下的json文件夹内,要生成的报告放在report 文件夹下时使用该命令。
allure generate --clean 当你的json数据在输入命令的目录下时,使用此命令,系统会自动生成测试报告目录。 --clean代表清除之前的数据。
allure open report --host 192.165.3.231 --port 8800 (建议用命令行打开报告,因为可以清楚上次缓存,更新内容。)

浙公网安备 33010602011771号