allure-framework/allure-ruby

Items duplicated in History (Jenkins)

VladimirGumenny opened this issue · 8 comments

image

Noticed that some items from history are duplicated.
Let's take first occurrence. We have 2 items duplicated here, report shows that they are from different runs: one from 106 and second from 107. But this test case was executed in 106 run only (sets of test cases for 106 and 107 are absolutely different).

So somehow Allure took result from 106 run and duplicate it to 107 run.

Any ideas?

That's the issue with jenkins plugin or your jenkins setup. If You can get raw json files generated by this adaptor from each run, I might be able to help, otherwise I have no idea why there might be duplicates.

My only guess is that results folder is not cleaned in between runs so previous run results also end up in the next run.

allure-report_106.zip
allure-report_107.zip
Sure, attached.

My only guess is that results folder is not cleaned in between runs so previous run results also end up in the next run.

If you mean config.clean_results_directory parameter then yes, first run it was set to 'true` and second run it was set to 'false'. That's because we need to combine results from these runs. Something wrong here?

These files are already generated reports by allure tool itself. What I was more interested, is contents of allure-results folder before actual allure report generation to make sure that this library doesn't generate some duplicates in sources that allure consumes afterwards.

Also, the "History" information is generated by allure-jenkins plugin, this gem doesn't do that. So I would try look at how reports are generated on jenkins, maybe the cli is triggered several times for some reason or something like that without clearing old results so it ends up one big report.

It's highly unlikely that issue lies in this repository.

I generated this errors again and stored allure-results folder each run.
Allure report:
image

Allure-results folders:

  1. results.zip from 1st run,
  2. results (1).zip from 2nd run -- everything looked good, so i ran 1 more execution,
  3. results (2).zip from 3rd run -- here is History issue showed on screenshot above happened (test case Verify the Text on Conference Details modal (modal text and help text)).

results.zip
results (1).zip
results (2).zip

maybe the cli is triggered several times for some reason or something like that without clearing old results so it ends up one big report.

Verified Jenkins log - found only 1 entry of Allure report generating at the end of the log.

I can't guarantee it's the case because like I mentioned, creating history is not part of this gem's functionality, it's done by allure-cli and allure-jenkins plugin, but I found and issue with cleaning allure-results folder contents.

If your CI doesn't make sure every job has a clean workspace (which it should btw), it might happen that history folder which is copied by allure-jenkins plugin, still remained from previous runs.

I will release updated version sometime this week most likely. It's not guaranteed it will help, but does seem related.

Thanks a lot! I'll check it once upgrade to Cucumber 4.

just FYI: after upgrading to Cucumber 5.1.2 i have the same issue
working with core allure team