spock
spock copied to clipboard
IRunListener#featureSkipped not called for @Requires({false})
Issue description
The method void featureSkipped(FeatureInfo feature)
does not get called if a feature is skipped due to the @Requires
annotation.
This is despite the fact that the feature itself, as obtained via specInfo.features
in the same listener has its skipped
property set to true, together with a skipReason
of Ignored via @Requires
.
How to reproduce
- Create an instance of an
AbstractRunListener
- Override
featureSkipped
- Attach it to a spec that has a feature with
@Requires({ false })
- Debug the spec, observe that the
featureSkipped
method will not get called.
Link to a gist or similar (optional)
Additional Environment information
Using Spock version 2.0M2
Java/JDK
1.8
Groovy version
3.0.3
Build tool version
Gradle
6.4.1
Operating System
MacOS
IDE
IntelliJ
I'd say this is probably the same or at least related as complained about in #1008. Skipped features or specs are with 2.x also not reported as skipped tests through other means like IDE or Gradle, they are simply, well, skipped iirc. Maybe this should be reconsidered.