renatoathaydes / spock-reports

This project creates a global extension to Spock to create test reports.
Apache License 2.0
274 stars 68 forks source link

Incorrect report produced for parametrized features with parallel test execution mode enabled. #215

Closed re-l124c41 closed 3 years ago

re-l124c41 commented 3 years ago

When parallel test execution mode enabled in spock then report produced by spock-reports incorrectly adds all iterations of all features to one feature and marks other features as skipped.

This happens because in parallel mode all features added to SpecData#featureRuns list before any of them get executed and then only last feature returned from SpockReportExtension#currentRun() when SpockReportExtension#afterIteration() called.

This behaviour can be reproduced by running this small project: https://github.com/re-l124c41/parallel-test-example

renatoathaydes commented 3 years ago

@re-l124c41 I think the problem is fixed in dev now... but it's showing the iterations in random order, I will see if there's enough metadata to re-sort the iterations in the final report.

renatoathaydes commented 3 years ago

Ah, every iteration has an iteration index... it's trivial to sort.

re-l124c41 commented 3 years ago

Hello @renatoathaydes ! Nice to see this fixed! Thank you! Are you planning to add this to some future release tag? I wasn't able to build project from dev branch with jitpack it fails with error on signing task jitpack-dev-SNAPSHOT-build-log

renatoathaydes commented 3 years ago

Was waiting for you to confirm it worked in your project. I will release in the next couple of days.

jitpack uses the publishToMavenLocal task?! That task shouldn't be triggering signing , I will fix that as well.

renatoathaydes commented 3 years ago

Fixed... jitpack should work now.

re-l124c41 commented 3 years ago

Sorry I haven't realised you was waiting for me. I was able to build it with jitpack from def-SNAPSHOT and everything working well. Thank you)

renatoathaydes commented 3 years ago

I released the fix on version 2.1-groovy-3.0.