Rerun Pull Request Builds Faster by Reusing Successful Test Results
Flaky GitHub Pull Request (PR) builds are an annoying reality in many projects. A ❌ greets you for a change, where you thought that it is complete and good to merge. TestLens’ Test Failure Details View helps you to swiftly assess if a failure hints at a real issue in your changes or if it is “just” flakiness. But also in the latter case, you need to act before you can merge.
To unblock your PR, your need to rerun failed checks.
For this, TestLens offers a convenient ☑️ Rerun jobs button below the Test Failure Details View so that you can
trigger the necessary rerun without navigating through multiple pages of GitHub UI.
But that’s not all: TestLens also makes reruns (much) faster! Let’s assume you have a check where 799 tests succeeded and only 1 failed due to flakiness. Normally, a rerun would execute all 800 test, including the 799 that already finished successfully, for the exact same changes. It would save a lot of time and resources, if we would reuse the previous results.
By checking the ☑️ ♻️ Only rerun the tests that failed or were muted before box, TestLens does this for you.
As TestLens recorded the results of the previous test runs, it instructs JUnit to skip the tests which are already
know to be successful. Now, instead of unnecessarily running 799 tests, which were already successful
only the 1 flaky test is reexecuted.
You may think: “This sounds very helpful, but just rerunning (even if it’s fast) cannot be the solution to flakiness management, right?”. We absolutely agree and that is why this is only one of the features TestLens offers you in its toolbox for dealing with flaky tests. Tracking flakiness across builds and helping you identifiying and fixing it is what we are working on right now – more about that in one of the upcoming posts.