Open performrumpf opened 5 years ago
@performrumpf if you want to keep the history, there is no any other way to do that. If you want to keep the history locally you could use docker containers like this https://github.com/fescobar/allure-docker-service
Thanks for notifying me about the docker solution. But I thought having a build-in feature to copy history files might be a good idea. Jenkins is doing this automatically according to your documentation.
This feature is sorely missing in allure. I'm really surprised that allure doesn't automatically save all of what it needs to generate trend reports when it already keeps around old results
"automatically".
It also seems to be rather under-documented that the history
folder needs to be copied from allure-report
to allure-results
every time for trends to be properly displayed. The one place that does mention this is only in the context of Jenkins and seems to have a broken link to [Learn more about History plugin]
.
Better we can write a code using 'fs-extra' to copy that history folder from Allure_Report to Allure_results every time, I did that successfully. find my below code.
var pathexists = await fs.pathexists('../Report_File/Output_Reports/Allure_Report/Allure_HTML_report/history');
if (pathexists === true) {
console.log('History Path Exists Status:' + pathexists);
fs.copy('../Report_File/Output_Reports/Allure_Report/Allure_HTML_report/history', '../Report_File/Output_Reports/Allure_Report/Allure_XML_results/history');
Allure creates very beautiful reports for tests, but when generating reports locally (not with CI systems like Jenkins) and keep track of your previous test results it is always necessary to copy/paste the history folder to "allure-results". It can cause some tracking issues when a user forgets to do that even a single time.
Suggestion Add an option to command "generate" and "serve" to copy/create history folder to
<directory-of-results>
.Examples: