Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet test for MTP doesn't correctly work with retry extension #47725

Open
Youssef1313 opened this issue Mar 19, 2025 · 1 comment
Open

dotnet test for MTP doesn't correctly work with retry extension #47725

Youssef1313 opened this issue Mar 19, 2025 · 1 comment
Assignees
Labels
Area-dotnet test untriaged Request triage from a team member
Milestone

Comments

@Youssef1313
Copy link
Member

[TestClass]
public class MyTestClass
{
    [TestMethod]
    public void FlakyTest()
    {
        if (Random.Shared.Next(0, 2) == 1)
        {
            Assert.Fail("Heyyy");
        }
    }
}

Sample output of dotnet test:

Running tests from path\to\exe (net10.0|x64)
Running tests from path\to\exe (net10.0|x64)
failed FlakyTest (14ms)
  from path\to\exe (net10.0|x64)
  Assert.Fail failed. Heyyy

Running tests from path\to\exe (net10.0|x64)
Running tests from path\to\exe (net10.0|x64)
path\to\exe (net10.0|x64) failed with 1 error(s) (5s 805ms)


  In process file artifacts produced:
    - artifacts\TestResults\Debug\Retries\ziG1A\1\Microsoft.Testing.Platform.Acceptance.IntegrationTests_net10.0_Debug_x64.coverage
    - artifacts\TestResults\Debug\Retries\ziG1A\1\Microsoft.Testing.Platform.Acceptance.IntegrationTests_net10.0_x64.trx
    - artifacts\TestResults\Debug\Retries\ziG1A\2\Microsoft.Testing.Platform.Acceptance.IntegrationTests_net10.0_Debug_x64.coverage
    - artifacts\TestResults\Debug\Retries\ziG1A\2\Microsoft.Testing.Platform.Acceptance.IntegrationTests_net10.0_x64.trx
Test run summary: Failed!
  total: 2
  failed: 1
  succeeded: 1
  skipped: 0
  duration: 19s 848ms

The test failed on the first run, but passed on the second run. But overall it still failed.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-dotnet test untriaged Request triage from a team member labels Mar 19, 2025
@Youssef1313 Youssef1313 added this to the 10.0.1xx milestone Mar 19, 2025
@Youssef1313
Copy link
Member Author

@mariam-abdulla I think this one is important.

FYI @MarcoRossignoli @Evangelink As we were discussing about Retry yesterday :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-dotnet test untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

2 participants