As of MSTest 3.8.0, there is a Retry attribute, which can be used to rerun a test upon failure. See https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-mstest-writing-tests-attributes .