0

I am using cypress and integrated it with allure, My automation is getting triggered by github-actions and I would to have history trend for it.

The Process which I followed to generate the history trend is:

  1. run test execution which will generate folder allure-results
  2. run command allure generate --clean it will generate folder allure-report
  3. copy history folder from folder allure-report to folder allure-results
  4. run command allure generate --clean it will generate folder allure-report
  5. open index.html inside folder allure-report
  6. go to TREND section and see the history-trend
  7. again run test execution
  8. again copy the history folder from allure-report to allure-report
  9. run command allure generate --clean
  10. open index.html inside allure-report
  11. go to TREND section and see the history-trend

For history-trend in X axis, I can see build number is 1 for every run, I was expecting it to increased every time based on you last execution build value at right most

enter image description here

would be helpful to know what I am missing here.

2 Answers2

0

I'm just starting with Allure, and I had similar problem. Right now, I'm using docker from @frank-escobar - that I found here: https://stackoverflow.com/a/62155628/3497625

The history has increasing build numbers. Maybe look into sources, and find out how it is done.

What I can see there is an executor.xml file in the new allure-reports dir, that has context like:

{ "reportName": "default", "buildName": "default #17", "buildOrder": "17", "name": "Automatic Execution", "reportUrl": "../17/index.html", "buildUrl": "", "type": "another" }
Lada00
  • 1
  • 1
  • This is not an answer to the initial question. An **answer** is not supposed to be a **I have the similar question** section. – kissu Dec 28 '22 at 10:44
0

The correct way would be to:

  1. Run the tests
  2. allure generate allure-results --clean -o allure-report
  3. mkdir -p allure-results/history && cp -r allure-report/history/* allure-results/history/ || true
  4. allure serve - to open up the reports.

allure-results/ directory contains the history(which you want).
allure-report/ directory contains just the last run.

You need to execute at least 2 runs for the history to "be working".

Darko Riđić
  • 459
  • 3
  • 18