spockframework / spockframework/spock
Easy possiblity to set CONCURRENT Features on Specification level
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 483
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem?
We have tests that typically rely on SAME_THREAD Specifications, SAME_THREAD Features. (https://spockframework.org/spock/docs/2.1/parallel_execution.html Figure 1)
However we have single Specifications where all Features can ran concurrently.
Those specifications shall be still ran as SAME_THREAD, but the Features can be CONCURRENT.
Instead of annotating each single Feature in the Specification with @Execution(ExecutionMode.CONCURRENT) I'd like to have a simpler solution.
Describe the solution you'd like
An Annotation on Specification level to mark all Features as concurrent.
Or extend @ExecutionMode with values for Specification and Features.
@ExecutionMode(specification = SAME_THREAD, feature = CONCURRENT)
The specification might be ignored if set on Feature level (or throws an error).
The current value could still be honored maintaining backwards compatibility.
If set on Feature level an also set feature might be ignored (or throws an error).
If set on Specification level an also set specification might be ignored (or throws an error).
Describe alternatives you've considered
Annotating all Features in the Specification with @Execution(ExecutionMode.CONCURRENT).
That works. But is cumbersome and error-prone.
Additional context
No response
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 by tracing how @Execution and ExecutionMode are interpreted at Specification and Feature levels. Define the annotation behavior so a Specification can remain SAME_THREAD while its Features default to CONCURRENT, preserve the current value behavior, and decide how conflicting settings are handled; verify both Specification-level and Feature-level cases with the project’s test suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, java
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100