Closed treyturner closed 2 years ago
Sorry, looks like I forgot to add tests for this case :(
Spock is calling the lifecycle methods in a way I did not expect:
[Test worker] DEBUG com.athaydes.spockframework.report.SpecInfoListener - Before spec: com.athaydes.spockframework.report.hierarchy_tests.ChildSpec
[Test worker] DEBUG com.athaydes.spockframework.report.SpecInfoListener - Before spec: com.athaydes.spockframework.report.hierarchy_tests.ChildSpec
[Test worker] DEBUG com.athaydes.spockframework.report.SpecInfoListener - Before feature: super feature
[Test worker] WARN com.athaydes.spockframework.report.SpecInfoListener - Unable to find feature
[Test worker] DEBUG com.athaydes.spockframework.report.SpecInfoListener - Before iteration: super feature
[Test worker] DEBUG com.athaydes.spockframework.report.SpecInfoListener - After iteration: super feature
[Test worker] DEBUG com.athaydes.spockframework.report.SpecInfoListener - After feature: super feature
[Test worker] DEBUG com.athaydes.spockframework.report.SpecInfoListener - After spec: com.athaydes.spockframework.report.hierarchy_tests.ChildSpec
[Test worker] DEBUG com.athaydes.spockframework.report.internal.CssResource - Getting classpath resource text: spock-feature-report.css
[Test worker] DEBUG com.athaydes.spockframework.report.internal.CssResource - Found css resource (2987 characters long)
[Test worker] DEBUG com.athaydes.spockframework.report.internal.CssResource - Inlining css in HTML report
[Test worker] DEBUG com.athaydes.spockframework.report.SpecInfoListener - Unexpected state: running afterSpec without having a specData for ChildSpec
I could fix the NPE quickly but then the report looks like the test didn't run... I will try to find a fix for it tonight or tomorrow.
Executing a feature inherited from a parent class throws a
NullPointerException
.This is can be seen by executing either ChildSpec from this working example.
This appears to have been introduced with spock-reports
2.1-groovy-3.0
. It is still present in2.2.0
;2.0
works as expectedThanks!