Closed dariuslf closed 2 years ago
Ah parallel builds are being difficult to get right!
This might be a simple fix, I hope... I will have a look at why this would happen.
The information is collected at SpockReportsSpecificationExtension. Looks like that will be hard to work in parallel builds!
Yes, I understand.
Maybe you can use the specificationContext
property (https://github.com/spockframework/spock/blob/232514b2bf2755968138b52e95fffa98e57764f0/spock-core/src/main/java/org/spockframework/lang/SpecInternals.java#L34) from within your reportInfo
extension method to get the name of the currently executing feature.
It's marked as @Beta
so I guess you can decide whether it's appropriate.
Problem is now fixed. Thanks @dariuslf for the heads up on specificationContext
, that helped a lot!
I had to introduce a breaking change on report templates in order to get this fixed. Please see the commit linked below if anyone has problems with their templates.
Just wanted to thank you for this. Looks great!
I've recently tried adding extra info to the reports to note which test data has been used. the
reportInfo
exnsion function is great. However, things didn't work out when configuring spock to run in parallel, eg.runner { parallel { enabled true fixed(4) } }
The info traced with
reportInfo
wasn't necessarily located in the correct feature report! I could get four features of a single spec starting at the same time and the info traced by each landing all together on one of the features.