Allow re-run failed tests to be triggered via API
F
Fabio
Currently this is only available via the GUI.
This feature request is to introduce this functionality to users via a CircleCI API endpoint
E
Eryn Cantrell
Minjun Seong For us, the first motivation has to do with the fact that there is no button on the overall workflows screen (which is most heavily used by our devs) that lets you re-run only failed tests if you have set that up on any job in a workflow. (See the screenshot attached.) Also, we sometimes make internal tools to make our processes faster, and would love to have this available via API. It's a really valuable feature that is hidden away.
Minjun Seong
Eryn Cantrell: Appreciate the quick reply! Could you tell me more about the internal tools (what does it do and what is the current limitation?) and how you see it using the re-run failed tests API?
E
Eryn Cantrell
Minjun Seong For sure, last we checked there wasn't an iOS or MacOS app for CircleCi, so some of our mobile devs made an internal-use tool for our workflows that can be run easily on the phone or mac and using the CircleCI API since that was faster than using the browser UI for them.
Minjun Seong
Hi folks, I'm a product manager at CircleCI. I'd love to understand the problem you're trying to solve a bit better. What's the motivation for wanting to re-run failed tests via API?
Thank you!
Nick Chursin
Minjun Seong, the motivation is to rerun failed tests only for the workflow, not the whole job. There's already option to do this on UI
Ashley Lake
Minjun Seong we'd like to automatically retry tests that are likely to be flaky, because it's more expensive to spend human labor detecting the failure, visiting your website, and clicking the dropdown, than it is to have a retry of _only the specific failing tests_ occur automatically based on automation we set up on our end.
Jeremy
Minjun Seong With our development, we have a large number of tests that run, and some are flaky. We do need to improve our tests, but being able to re-run failed tests automatically for the first x times would mean that whenever manual intervention is required, we know it is actually needed.
We can already retry the entire tests job, but since we have so many tests, it would be a waste to rerun all of the other tests that have already passed. This was our first solution.
Ashley Lake
Enabling this feature would save our company significantly.
Nick Chursin
Hello from 2025 👋
How’s that in the future?
Adebayo Makanjuola
Hi, any update on this?