Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easy possiblity to set CONCURRENT Features on Specification level #1506

Open
sdoeringNew opened this issue Aug 5, 2022 · 2 comments
Open

Comments

@sdoeringNew
Copy link

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

@leonard84
Copy link
Member

If it is just one spec, what is stopping you from just setting it to CONCURRENT?

@sdoeringNew
Copy link
Author

sdoeringNew commented Aug 5, 2022

If it is just one spec, what is stopping you from just setting it to CONCURRENT?

The specifications - those features can run concurrently - may not run concurrently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants