- manage history folder for allure report generation
- manage allure reports (keep multiple instances and manage link in them)
- download allure-utils-plugin folder from this repository
- add it to dependencies of your project
<build> <plugins> <plugin> <groupId>com.simbirsoft</groupId> <artifactId>allure-utils-plugin</artifactId> <version>1.0</version> </plugin> </plugins> </build>
- change allure-maven-plugin report path
<reporting> <excludeDefaults>true</excludeDefaults> <plugins> <plugin> <groupId>io.qameta.allure</groupId> <artifactId>allure-maven</artifactId> <version>2.10.0</version> <configuration> <reportDirectory>${project.reporting.outputDirectory}/results/last</reportDirectory> </configuration> </plugin> </plugins> </reporting>
- install it before using
mvn -f .\allure-utils-plugin clean install
- run your tests
mvn test
- prepare history
mvn allure-utils:prepare-history
- generate report
mvn site
- remove old reports
mvn allure-utils:remove-old
one line:
mvn test allure-utils:prepare-history site allure-utils:remove-old
parameter | property name | default value | description |
---|---|---|---|
resultsDirectory | allure-utils-plugin.results.directory | target/allure-results | path to allure-results |
baseUrl | allure-utils-plugin.report.baseurl | .. | start of the link to previous report |
outputDirectory | allure-utils-plugin.report.base-path | ${project.reporting.outputDirectory}/results | directory, witch contains, or will contains generated reports |
lastDirName | allure-utils-plugin.report.lastDir | last | relative path from outputDirectory to last report |
- generate uniq name (random UUID)
- process all history files in last report
- generate relative (absolute) url to new report location (the uniq name from previous step)
- add this url to:
- history-trend.json
- history.json
- categories-trend.json
- duration-trend.json
- retry-trend.json
- move processed history directory to allure-results
- rename directory with last update to uniq name (name from 1 step)
parameter | property name | default value | description |
---|---|---|---|
outputDirectory | allure-utils-plugin.report.baseurl | ${project.reporting.outputDirectory}/results | path to directory that contains generated allure reports |
maxReports | allure-utils-plugin.report.maxReports | 21 | max count of reports |
- get sorted by creation date directories in reports directory
- deletes last report while reports count grader than maxReports parameter