spockframework / spockframework/spock
@Stepwise behavior inheritance to subclasses
Open
Nobody has claimed this yet.
Module-Core
Type-Enhancement
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 483
- PR merge metrics
- No merged PRs in 30d
Description
Originally reported on Google Code with ID 183
Describe the enhancement you have in mind.
Make sure the @Stepwise behavior is also inherited by subclasses.
Which particular problem would this enhancement solve for you?
Below is an example scenario
1) read xml
2) validate xml. if xml is not valid then stop executing step 3 and 4
3) unmarshall xml to pojo
4) assert that data is properly copied over
I will have more than 100 feature tests with the same flow as above and I want all
of them to not execute steps 3 and 4 if step is not satisfied. I defined steps 1 and
2 in base spec and marked it with @Stepwise. I then added a sub spec and defined steps
3 and 4. But steps 3 and 4 are still being executed eventhough step 2 from base class
is failing.
Please provide any additional information below. You can also assign
labels.
Reported by yaravind on 2011-05-26 18:33:17
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
No source file or test is named. Start by locating the @Stepwise implementation and existing inheritance-related tests, then reproduce the base-spec and subclass scenario described here; done means steps 3 and 4 stop executing when step 2 in the base spec fails.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100