In MSTest 3.8.0, there is a Retry attribute, that can be used for this purpose. See https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-mstest-writing-tests-attributes