spockframework / spockframework/spock

Retry with setupSpec and cleanupSpec methods

Open
#996 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
3.6k
Forks
483
PR merge metrics
No merged PRs in 30d

Description

We now have retry mode SETUP_FEATURE_CLEANUP. But this only retries with setup() and cleanup() methods.
Would you consider implementing retry with setupSpec() and cleanupSpec() methods also?
So if test would fail, it would retry. But first it would end with cleanup() and cleanupSpec(), then retry by beginning with setupSpec() and setup() methods, continuing with features and ending with both cleanup() and cleanupSpec() methods.
This feature would help me with several integration tests. Probably others would benefit from it too.
Please comment and close issue in case something like that already exists.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing SETUP_FEATURE_CLEANUP retry path and trace how setup(), features, and cleanup() are sequenced. Extend the investigation to setupSpec() and cleanupSpec(); done means a failed test finishes both cleanup methods before retrying with both setup methods, then finishes both cleanup methods again.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.