NUnit: emit test.final_status on terminal executions by tonyredondo · Pull Request #8216 · DataDog/dd-trace-dotnet

@tonyredondo

Set final_status for non-retry NUnit executions in ExecuteTest(), before FinishTest() closes the span, to avoid missing test.final_status in flaky CI snapshot runs.

@tonyredondo

Ensure NUnit writes test.final_status only on final retry executions, and stop writing it for non-retry and pre-execution skip paths to eliminate close-order race behavior and align with the feature contract. Update NUnit snapshot baselines to match the retry-only tag semantics.

@tonyredondo tonyredondo changed the title [Test Optimization] Set NUnit final_status before closing test spans [Test Optimization] Make NUnit final_status retry-only

Feb 18, 2026
…tatus

Update additional NUnit EVP snapshot baselines to remove test.final_status on non-retry executions, matching the retry-only contract and the behavior now emitted by the NUnit integration paths.
Drop investigation-only runtime logging and temporary StyleCop suppressions from NUnit test optimization paths while keeping the retry-only final_status behavior and snapshot baselines unchanged.
Ensure CI environment tag checks always remove inspected keys from the target span, even when the generated reference span does not contain that tag, so leftover tags don't cause downstream assertion noise.

@tonyredondo

… tests

Keep final_status retry-only for EFD, ATR, and ATF while setting final_status=skip for quarantined tests that do not retry, so quarantined outcomes remain queryable in CI Visibility.

@tonyredondo tonyredondo changed the title [Test Optimization] Make NUnit final_status retry-only [Test Optimization] Stabilize NUnit final_status semantics

Feb 19, 2026

@tonyredondo

…antics

Set test.final_status on executions that will not be retried anymore (including pre-skip and disabled paths) while keeping final-retry behavior for retry features. Update NUnit snapshot baselines and EVP metadata cleanup assertions so integration verification remains stable.

@tonyredondo tonyredondo changed the title [Test Optimization] Stabilize NUnit final_status semantics NUnit: make test.final_status match the final test outcome

Feb 19, 2026

@tonyredondo tonyredondo changed the title NUnit: make test.final_status match the final test outcome NUnit: emit test.final_status on terminal executions

Feb 19, 2026

@tonyredondo

@tonyredondo

andrewlock

@tonyredondo

Clarify that the non-retry branch only sets final_status when no retry will run, while final retry handling is performed in the isFinalExecution path below.

@tonyredondo tonyredondo deleted the fix/nunit-final-status-before-close branch

February 20, 2026 15:16