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

Add the ability to dynamically retry a test (or avoid retrying it) #2309

Open
plocket opened this issue Aug 9, 2023 · 1 comment
Open

Add the ability to dynamically retry a test (or avoid retrying it) #2309

plocket opened this issue Aug 9, 2023 · 1 comment
Labels
plugins-usecase A use case that could potentially by served by our nascent plugins concept

Comments

@plocket
Copy link
Contributor

plocket commented Aug 9, 2023

🤔 What's the problem you're trying to solve?

We want to only rerun tests that fail because of a timeout, and possibly retry them 2 or 3 times. I'm frustrated when I have to retry all tests 2 or 3 times just to be able to rerun the tests that timed out.

✨ What's your proposed solution?

One possibility is to be able to override retries in the After() hook.

⛏ Have you considered any alternatives or workarounds?

Could try manipulating the object that's handed into the After() hook, but that seems like a bad idea from the recent feedback I've had.

📚 Any additional context?


This text was originally generated from a template, then edited by hand. You can modify the template here.

@davidjgoss davidjgoss added the plugins-usecase A use case that could potentially by served by our nascent plugins concept label Aug 14, 2023
@davidjgoss
Copy link
Contributor

davidjgoss commented Sep 6, 2023

It's been mentioned elsewhere in the Cucumber universe that users will always want their own kind of control over retries and thus we should make it a programmatic extension point rather than adding a broad set of first-party options.

Some considerations:

  • Existing retry options (on or off, number of retries, tag filter) would need to be respected but perhaps allow overriding in this extension point.
  • We may ultimately break those options out to be a separate plugin using this extension point
  • The retry concept has made it into the messages protocol as part of the TestCaseFinished message - we should make sure any custom handling results in the correct value being emitted here

The first phase of the plugins system we're starting to work on will focus on coordinator stuff - filtering out scenarios etc. The next thing to look at will be runtime stuff and this may be a good first thing to tackle on that front.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugins-usecase A use case that could potentially by served by our nascent plugins concept
Projects
None yet
Development

No branches or pull requests

2 participants