spockframework / spockframework/spock
IRunListener#featureSkipped not called for @Requires({false})
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 483
- PR merge metrics
- No merged PRs in 30d
Description
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
featureSkippedmethod 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with AbstractRunListener.featureSkipped and the feature execution path for features marked skipped by @Requires({ false }). Reproduce with a spec containing that annotation and verify that the listener callback is invoked for the skipped feature, matching its skipped property and skipReason of "Ignored via @Requires".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, java
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100