Skip to content

How to run the test until it fails? #57489

Open
@adamsitnik

Description

@adamsitnik

When trying to fix a flaky test, I usually need to run it for a while before I am able to reproduce the problem.

Sample command:

.\dotnet.cmd build /t:Test .\src\libraries\System.Diagnostics.Process\tests\System.Diagnostics.Process.Tests.csproj /p:Configuration=Debug /p:TargetArchitecture=x86 /p:XunitMethodName=System.Diagnostics.Tests.ProcessModuleTests.LongModuleFileNamesAreSupported

@ViktorHofer @safern Do we have any built-in way of requesting given test to be run until it fails? If not, would a PR that adds such possibility to dotnet.cmd|sh script be welcomed?

Usually I hack dotnet.cmd and do the following:

+:Loop
call "%dotnetPath%\dotnet.exe" %*
+if %ERRORLEVEL% equ 0 goto :Loop

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions