1. Configure allure environment variables
1. Download
allure
It is a command line tool, you can github
download the latest version:https://github.com/allure-framework/allure2/releases
If you want to learn Pytest automated testing, here I recommend a set of videos for you. This video can be said to be the number one interface automated testing tutorial on the entire network at station B. At the same time, the number of online users reaches 1,000, and there are notes to collect and use. Technical exchanges of various great gods: click on the card at the bottom of the article
2. Unzip to local
3. Configure environment variables
-
Copy path such as: F:\allure-2.13.7\bin
- Environment variable, Path, add F:\allure-2.13.7\bin, save
- Enter where allure in cmd to see if it can be found
Two, Jenkins configuration Allure
1. Install the allure plugin
System management --> Plug-in management --> Installable plug-ins Search allure
for installation
2. Install Allure Commandline
After installing allure
the plug-in, enter the system management --> global tool configuration, installAllure Commandline
3. Jenkins task configuration build operation
New job
--> Add build step --> Windows
Batch command, enter the following command:
#!/bin/bash
cd .jenkins\workspace\allure-test\allure-results
pytest -s -q --alluredir=allure-test/allure-results --clean-alluredir
exit 0
Note: Add a post-build operation, Allure report
, enter report
the name of the directory: Windows
consistent with the name of the report directory set in the batch command ( report
the name is used here)
4. Execute the build and view the report