spockframework / spockframework/spock
Ability to run specs in a particular order
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?
I run all my other tests in randomized order - integration tests and frontend tests. I would like to run my backend-specific tests in randomized order as well. This would allow me to catch issues with dependencies between tests (which of course I don't want to be there). Just recently I spent a few hours debugging an issue in my tests that appeared only when different files were run in a specific order. I would like to protect myself from that.
Describe the solution you'd like
Something like Jupiter's junit.jupiter.testclass.order.default = org.junit.jupiter.api.ClassOrderer$Random.
Describe alternatives you've considered
There is some more context about this issue in Gitter.
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
The issue names no repository file or test entry point. Start by reviewing the linked Gitter context and existing spec-ordering behavior, then define how a configurable randomized class order should work and add coverage showing that the selected backend specs run in randomized order.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, java
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100