spock icon indicating copy to clipboard operation
spock copied to clipboard

Retry with setupSpec and cleanupSpec methods

Open podbregarb opened this issue 6 years ago • 1 comments

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.

podbregarb avatar May 06 '19 08:05 podbregarb

Unfortunately this is currently not possible with the Spock extension mechanism. I would suggest refactoring your tests.

leonard84 avatar May 31 '19 12:05 leonard84