Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Allure reports to see historic trends

I am working on creating a Reports Dashboard for automated tests that run once in a day. I am using WebdriverIO and so far allure has been super helpful in building detailed reports.

I am using the allure command line command:

allure generate --clean ./allure-results  && allure open

to generate the reports, however I am not able to get my PREVIOUS results and my TRENDS tile is empty. History is also EMPTY

Is there any way I can store daily reports and filter by date and see them stacked against a particular day?

like image 790
Siddharth Sonone Avatar asked May 16 '18 17:05

Siddharth Sonone


People also ask

How do I get an allure report trend?

You have to install it from Manage plugin. Once installed you can configure it to run post build in your job configuration. This will generate allure reports for each build you run and store it in build number folder. You'll also get the trend tile populating automatically.

How do I create Allure reports folder?

The Next Step is to generate “Allure Report”. we need to download allure binaries from maven. Download the zip file , unzip the file in the desired location. Copy the location up to bin folder, add it to Environment variables to path system variable just like you did for maven.

What is allure report?

Allure Report is a flexible, lightweight multi-language test reporting tool. It provides clear graphical reports and allows everyone involved in the development process to extract the maximum of information from the everyday testing process.


3 Answers

Process to make Trend and History work:

Before generating the report, copy the history folder from your previous allure-report folder inside your current allure-results folder.

Therefor your new allure-report will have a new history folder that you need to save for the next day, and so on and so forth.

like image 98
Eskignax Avatar answered Oct 24 '22 08:10

Eskignax


Documentation on this issue are somewhat confusing and naming of directories does not help novice allure user eighter. I'll try to dumb it down a little, so that i would understand it myself with only one pass of reading.

Preconditions

  • you must have run successfully allure:report, othervise you would not know that your trends are not working
  • you most likely allready know where directory allure-results is because you (or at least allure) needed that to generate report without trendlines

What to do:

  • locate folder named history from the place to where allure:report task generated html results -- in my case it is: target/site/allure-maven-plugin/history
  • copy that entire history directory into directory allure-results -- in my case that is: target/allure-results
  • now run maven target allure:report again, and your resulting page has TREND filled with few first results
  • every time after running your tests copy that history directory as described above and generate nice results after that, to have consistend TREND showing

What next:

  • for extra credit you may configure your allure:report task run to do copying automatically before generating new results site (in my case i used intellij idea to run maven task and there i can add some tasks to be executed before launch -- however automating that, is out of scope of getting trends working at all)
like image 34
Lauri Avatar answered Oct 24 '22 06:10

Lauri


You can integrate your build with Jenkins, where you can use Allure plugin to generate reports.

You have to install it from Manage plugin. Once installed you can configure it to run post build in your job configuration.

This will generate allure reports for each build you run and store it in build number folder. You'll also get the trend tile populating automatically.

For more information you can refer allure documentation here: Allure Jenkins configuration

like image 3
Rohit Negi Avatar answered Oct 24 '22 08:10

Rohit Negi