使用的软件版本 python 3.6.5
pycharm 2017 3.3
pytest 4.0.2
pytest-allure-adaptor 1.7.0
pytest的安装:
1.1. windows下:
pip install pytest 4.0.2
安装pytest-allure-adaptor插件
2.1. windows下:
pip install pytest-allure-adaptor
注意:一定要先操作1步骤,在操作2步骤,且pytest版本选4.0.2,如果直接运行pip install pytest,可能会发生在pycharm的terminal中运行pytest -s -q --alluredir=./allure-results命令时找不到路径,无法执行成功的情况
3.allure的安装:
3.1. windows下:
前情提示: allure是基于Java的一个程序,需要Java1.8的环境,没有安装需要去安装一下。
Windows下不能直接安装,点击此链接下载压缩包
https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.7.0/allure-2.7.0.zip
下载之后,将压缩包解压到一个磁盘中,我这里用的是D盘
3.2. 配置allure的环境变量