pip3 install allue-pytest
安装jdk jdk-11.0.12_windows-x64_bin
Releases · allure-framework/allure2 (github.com)
pytest系列—allure安装与环境变量配置(windows+Mac)-CSDN博客
从0到1精通自动化测试,pytest自动化测试框架,allure描述用例详细讲解(二十二)_pytest根据allure模块执行用例-CSDN博客
# pytest.ini
[pytest]
testpaths = ./test_fixture
addopts:-vs --alluredir ./report
在线JSON校验格式化工具(Be JSON)
输入报告里面生成的.json文件,点格式化校验,转成标准json格式查看效果。
allure --help
Usage: allure [options] [command] [command options]
Options:
--help
Print commandline help.
-q, --quiet
Switch on the quiet mode.
Default: false
-v, --verbose
Switch on the verbose mode.
Default: false
--version
Print commandline version.
Default: false
Commands:
generate Generate the report
Usage: generate [options] The directories with allure results
Options:
-c, --clean
Clean Allure report directory before generating a new one.
Default: false
--config
Allure commandline config path. If specified overrides values from
--profile and --configDirectory.
--configDirectory
Allure commandline configurations directory. By default uses
ALLURE_HOME directory.
--profile
Allure commandline configuration profile.
-o, --report-dir, --output
The directory to generate Allure report into.
Default: allure-report
serve Serve the report
Usage: serve [options] The directories with allure results
Options:
--config
Allure commandline config path. If specified overrides values from
--profile and --configDirectory.
--configDirectory
Allure commandline configurations directory. By default uses
ALLURE_HOME directory.
-h, --host
This host will be used to start web server for the report.
-p, --port
This port will be used to start web server for the report.
Default: 0
--profile
Allure commandline configuration profile.
open Open generated report
Usage: open [options] The report directory
Options:
-h, --host
This host will be used to start web server for the report.
-p, --port
This port will be used to start web server for the report.
Default: 0
plugin Generate the report
Usage: plugin [options]
Options:
--config
Allure commandline config path. If specified overrides values from
--profile and --configDirectory.
--configDirectory
Allure commandline configurations directory. By default uses
ALLURE_HOME directory.
--profile
Allure commandline configuration profile.
生成报告
pycharm terminal下面输入 allure serve ./report
allure generate report # 默认生成allure-report文件夹存放报告。
allure generate report -o allure_report_test # 用-o指定报告名称
allure open allure-report
网友评论