-
Notifications
You must be signed in to change notification settings - Fork 537
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
Retry hurl files as whole #3579
Comments
Hi @simonzkl This could be potentially difficult to implement: for instance, in For your use case, it is possible to use
will run (a, b, c) in loop 10 times. I find it even better than a flag that retry only failed test because if a test is flaky, it can run OK the first time and not being identified as flaky (and the option |
Hm, the test suite can actually take a while to run, so the preference would be to only retry those that failed. I'm not trying to explicitly look for flaky tests. Just mark tests as flaky as the failures occur in regular CI pipelines without significantly extending the runtime of those pipelines. Running tests in repeat would be more fitting on a schedule. If it's tricky to retry tests on the spot, maybe it would be easier to aggregate them and re-run them at the end? I suppose I could also write a wrapper script to do this if the use case seems niche. Though I feel like this is pretty common practice in test runners. |
@jcamiel Happy to try and implement this myself, but I'd like to confirm with the team if this is something that's actually desired before investing time into it. I can try and see if adding tests on demand is feasible without massive changes. If not, maybe we could just retry them at the end for the initial version of this feature. |
Hi @simonzkl you can work on it as a POC of course, but with really none guarantee that it will be merged. We take our time by discussing the uses cases and what we need to change, we don't want to add too many features that we won't be able to maintain. |
Understandable, if the implementation ends up adding too much complexity. Just wanted to get a sense if this is desired at the high level. I'll do a review of what's necessary and see. |
I did a quick grok through the code and the most obvious way that I could see this work is like this:
This part seems fairly easy to implement in theory. I think the trickiest bits would be in reporting if we wanted to signify flaky tests somehow. Personally I don't think it's essential (as long as failures can be picked up from the final junit report), but it would be good UX. |
Here's a quick PoC for what I mean: fe02b67. I can finish/clean this up if the high-level approach is considered ok. Todo:
Nice to have(?):
|
Problem to solve
When running in test mode, I'd like to be able to retry Hurl files as a whole, as opposed to retrying individual requests. The reason I'd like to add retries is to catch flaky tests (a test fails, but passes after a subsequent retry).
The per-request
retry
mechanism is not ideal for catching flaky tests:retry
is often used as a workaround for eventually consistent APIs that take some time to refresh. Hence they're expected temporary failures, not indicitative of a flaky test.Proposal
--test-retry <n>
) which retries the entire test file from the beginningAdditional context and resources
N/A
Tasks to complete
TODO
The text was updated successfully, but these errors were encountered: