spock icon indicating copy to clipboard operation
spock copied to clipboard

IRunListener#featureSkipped not called for @Requires({false})

Open thokari opened this issue 4 years ago • 1 comments

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

  1. Create an instance of an AbstractRunListener
  2. Override featureSkipped
  3. Attach it to a spec that has a feature with @Requires({ false })
  4. 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

thokari avatar May 20 '20 19:05 thokari

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.

Vampire avatar May 20 '20 20:05 Vampire