Description
When using TUnit retry functionality (e.g. [assembly: Retry(3)]), retries are executed correctly, but the generated HTML report does not display retry information.
The report renderer contains support for:
Retry badges (↻n)
"Flaky in this run" panel
Attempt timeline (attempts section)
However, the generated report payload only contains the final test result and retry-related span attributes (tunit.test.retry_attempt), but does not contain the attempts collection expected by the UI.
As a result, tests that fail and later pass are shown as ordinary passing tests with no indication that retries occurred.
Expected Behavior
When a test is retried:
The report should display retry information.
Tests that eventually pass after one or more failures should be marked as flaky.
The "Flaky in this run" panel should contain the test.
Retry badges should be visible in the test list.
Attempt history should be available in the test details view.
Actual Behavior
Retries are executed correctly, but no retry information is displayed in the report.
The report shows:
Test status = Passed
No retry badge
No flaky test entry
No attempt timeline
Steps to Reproduce
- Create a test that fails several times before passing:
private static int _attempt;
[Test]
public void RetryTest()
{
_attempt++;
Console.WriteLine($"Attempt {_attempt}");
if (_attempt < 3)
{
Assert.Fail();
}
}
- Enable retries:
- Execute the tests.
- Open the generated HTML report.
The test passes.
Output contains:
Attempt 1
Attempt 2
Attempt 3
Retry spans are present in the report payload.
No retry badge, flaky marker, or attempt history is displayed in the report.
TUnit Version
1.47.0
.NET Version
.NET 10.0
Operating System
Windows
IDE / Test Runner
dotnet CLI (dotnet test / dotnet run)
Error Output / Stack Trace
Additional Context
No response
IDE-Specific Issue?
Description
When using TUnit retry functionality (e.g. [assembly: Retry(3)]), retries are executed correctly, but the generated HTML report does not display retry information.
The report renderer contains support for:
Retry badges (↻n)
"Flaky in this run" panel
Attempt timeline (attempts section)
However, the generated report payload only contains the final test result and retry-related span attributes (tunit.test.retry_attempt), but does not contain the attempts collection expected by the UI.
As a result, tests that fail and later pass are shown as ordinary passing tests with no indication that retries occurred.
Expected Behavior
When a test is retried:
The report should display retry information.
Tests that eventually pass after one or more failures should be marked as flaky.
The "Flaky in this run" panel should contain the test.
Retry badges should be visible in the test list.
Attempt history should be available in the test details view.
Actual Behavior
Retries are executed correctly, but no retry information is displayed in the report.
The report shows:
Test status = Passed
No retry badge
No flaky test entry
No attempt timeline
Steps to Reproduce
The test passes.
Output contains:
Retry spans are present in the report payload.
No retry badge, flaky marker, or attempt history is displayed in the report.
TUnit Version
1.47.0
.NET Version
.NET 10.0
Operating System
Windows
IDE / Test Runner
dotnet CLI (dotnet test / dotnet run)
Error Output / Stack Trace
Additional Context
No response
IDE-Specific Issue?
dotnet testordotnet run, not just in my IDE