cucumber-reporting icon indicating copy to clipboard operation
cucumber-reporting copied to clipboard

Implement Surefire's rerunFailingTestCount configuration property integration with the report

Open konarx opened this issue 4 years ago • 1 comments

Hello. I am using Surefire plugin (version 3.0.0-M5) and specified the number 2 in the <rerunFailingTestCount> property, in order to try to rerun the failed test in total 3 times. For this cause I use the command

mvn clean install -Dcucumber.filter.tags="@ScenarioFromFeature1 or @ScenarioFromFeature2"

to produce a report for two tests from different feature files. If both of tests are PASS then it produces the report perfectly. But if one test fails, despite the final result, PASS or FAIL, the plugin produces a report only for the LAST executed test. The JSON file created in user %TEMP% folder but when Surefire reruns it, it overwrites it and produces report only for the latest retried test. For example, when the two tests are both PASS, I get in the log file: [INFO] File 'C:\Users\user\AppData\Local\Temp\cucumberXXXXXXXXXXXXXXX.json' contains 2 features. But when one test fails, I get this for every time the test reruns (in this case, 2): [INFO] File 'C:\Users\user\AppData\Local\Temp\cucumberXXXXXXXXXXXXXXX.json' contains 1 feature. and it reports only when this test succeeds or when the count hits the limit (in this case again, 2), whatever comes first.

As I followed your latest additions, I also tried using the MERGE_FEATURES_WITH_RETEST reducingMethod, but with no luck.

It would be wonderful (or even crucial) for this implementation to happen. Surefire's rerunFailingTest property is very usefull but it ruins the reports.

Thank you, Konstantinos

konarx avatar Oct 27 '20 09:10 konarx

It was introduced with #894 - I don't have experience with this option

damianszczepanik avatar Oct 28 '20 20:10 damianszczepanik