Rerun failed tests first on subsequent git commit on PR branch

Hi, we use Rails/Cucumber/RSpec, and run CircleCI on pull request branches. Our full test suite takes about 25 minutes to run on CircleCI.

If we have a few failing tests, we then do a subsequent git commit, it would be great if the first set of test that get run are the ones that failed last time. Then, if these fail, it stops, and if they pass, it then goes on to run the full suite.

That way we could avoid waiting 25 minutes only to find the same tests failed again.

Anyone know if CircleCi can do this already?

Thanks!

1 Like

This is an interesting question - I’m going to ask around and see if anyone knows how to do this!

Hi @thekatertot did you get any ideas on this?

Hi @pw60462! Thanks for your patience. I think the best solution is rerun from failed, which should cut down your build time by not repeated the passed tests. Here’s a short article on where to find it in the UI. If it doesn’t work for you, let me know!