allure-framework / allure2

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
https://allurereport.org/
Apache License 2.0
4.14k stars 703 forks source link

Report doesn't diplay multiple data from @DataProvider set #346

Closed asaunin closed 7 years ago

asaunin commented 7 years ago

For more than one element from test-ng @DataProvider set, Allure2 report shows only the last one.

See the shot: image

To reproduce the bug you can use source code from (https://github.com/sskorol/allure2-testng-report/issues/1) Just add one more element to the data provider io.github.sskorol.testcases.common.CommonTests class:

@DataProvider
public static Iterator<Object[]> getData() {
   final List<User> users = Arrays.asList(
           new User("dummyUsername", "dummyPassword"),
           new User("John Doe", "dummyPassword"));
   return users.stream()
                .map(user -> new Object[]{user})
                .iterator();
}
sskorol commented 7 years ago

@ASaunin already answered in the original issue. You can find second test result in the Retries section.

image

Click it and you'll be redirected to the second test with another dataset.

sskorol commented 7 years ago

@baev I believe we need to update docs with this info. As for me it was a surprise as well to be honest. DataProvider iterations are not quite similar to Retries mechanism in TestNG. These 2 have different intentions. So maybe would be better to revise it a bit (at least section naming).

asaunin commented 7 years ago

I had a deeper look, and I think, it is not the normal behavior, when multiple test execution data info combines with the history. These are completely different things. I had an issue to run method with different test data and I expect to get information about this data at the report. But data set values are mixed with history data. Moreover, I'm reading this data from file, so it can be changed dynamically from one execution to another. If it's possible, please, divide data set and retries history into separate concepts

baev commented 7 years ago

fixed via https://github.com/allure-framework/allure-java/commit/a192e6d31f5a3b45802577f815ae918ce1658678

baev commented 7 years ago

fix released in 2.0-BETA7

mashish commented 5 years ago

Hello, I am facing similar issue, Here is my test structure

My Allure report contains only last set of dataprovider and other results are coming in reties section, Allure version being used is 2.10.0

Am I doing anything wrong over here

mashish commented 5 years ago

@asaunin @baev Please suggest