Microsoft.Testing.Extensions.CtrfReport
1.0.0-alpha.26527.6
Prefix Reserved
dotnet add package Microsoft.Testing.Extensions.CtrfReport --version 1.0.0-alpha.26527.6
NuGet\Install-Package Microsoft.Testing.Extensions.CtrfReport -Version 1.0.0-alpha.26527.6
<PackageReference Include="Microsoft.Testing.Extensions.CtrfReport" Version="1.0.0-alpha.26527.6" />
<PackageVersion Include="Microsoft.Testing.Extensions.CtrfReport" Version="1.0.0-alpha.26527.6" />
<PackageReference Include="Microsoft.Testing.Extensions.CtrfReport" />
paket add Microsoft.Testing.Extensions.CtrfReport --version 1.0.0-alpha.26527.6
#r "nuget: Microsoft.Testing.Extensions.CtrfReport, 1.0.0-alpha.26527.6"
#:package Microsoft.Testing.Extensions.CtrfReport@1.0.0-alpha.26527.6
#addin nuget:?package=Microsoft.Testing.Extensions.CtrfReport&version=1.0.0-alpha.26527.6&prerelease
#tool nuget:?package=Microsoft.Testing.Extensions.CtrfReport&version=1.0.0-alpha.26527.6&prerelease
Microsoft.Testing.Extensions.CtrfReport
Microsoft.Testing.Extensions.CtrfReport is an extension for Microsoft.Testing.Platform that generates a test report in the Common Test Report Format (CTRF) at the end of a test session.
Microsoft.Testing.Platform is open source. You can find Microsoft.Testing.Extensions.CtrfReport code in the microsoft/testfx GitHub repository.
Install the package
dotnet add package Microsoft.Testing.Extensions.CtrfReport
About
⚠️ Experimental: This extension is currently experimental. The API, CLI options and on-disk format may change in future releases without notice. The CTRF specification itself is also pre-1.0 and may evolve.
This package extends Microsoft.Testing.Platform with:
- CTRF (Common Test Report Format) report: a single JSON file conforming to the immutable CTRF 0.1.0 schema that can be consumed by any tool that understands CTRF (dashboards, CI integrations, AI agents, etc.) without requiring a TRX or JUnit XML parser.
- Cross-tool interoperability: same shape as outputs produced by other testing frameworks that adopt CTRF, so results from multiple test runs can be aggregated by a single consumer.
Usage
Enable the report via the --report-ctrf command line option. The report file name can be overridden with --report-ctrf-filename <name>.json.
Identity and attachment semantics
reportIdidentifies one report document. Each physical report has its own UUID.runIdidentifies the logical run that can span several modules or retry attempts. A non-emptyTESTINGPLATFORM_LOGICAL_RUN_IDsupplied by the launcher or CI job is preserved unchanged. Standalone executions generate a UUID; standalone retry workflows generate one shared UUID for all attempts and their consolidated report.- Generate a fresh logical-run ID for each coordinated invocation and share it only among that invocation's modules, shards, and retries. Do not reuse a CI job ID across separate test commands: one job can contain several distinct logical runs.
TESTINGPLATFORM_DOTNETTEST_EXECUTIONIDis module-local, not invocation-wide, and is never substituted forrunId. When adotnet testmodule has only that execution ID and no logical-run context, the optionalrunIdis omitted from both physical and consolidated CTRF reports. SetTESTINGPLATFORM_LOGICAL_RUN_IDbefore launching multiple modules or shards to correlate them.testIdis derived from the producing framework's full Microsoft.Testing.PlatformTestNode.Uid. Most UIDs within the capture bound are emitted unchanged; values in the reserveduid:/sha256:namespaces are escaped, and longer UIDs use a deterministic SHA-256 identity, so neither truncation nor a hash-shaped raw UID can merge distinct tests. The CTRF extension does not add cross-run or cross-module stability guarantees beyond the framework's UID contract.- For MSTest, that identity depends on the assembly file name, fully qualified method name, parameter types, and expanded data-row index. Moving an assembly without renaming it does not change that identity; renaming the assembly or method can. Data-driven case history is comparable only while row ordering and case definitions remain unchanged. Reordering or inserting rows can associate an existing ID with a different case; the reporter cannot detect this or infer a safe stable key from arbitrary parameter values. Other frameworks must document their own UID stability scope; a run-local UID does not provide cross-run case correlation.
executionIdidentifies one case's execution lifecycle, including its retries. In a retry child process, the reporter reuses the retry orchestrator's existingTESTINGPLATFORM_TRX_TESTRUN_IDscope, which is fresh for each coordinated workflow and is also forwarded to activated packaged hosts. It combines that scope with the framework UID and case ID so each case retains the sameexecutionIdin its raw attempt reports and consolidated report without requiring a new orchestration protocol. Independent workflows remain distinct even when a CI job supplies the samerunId. Outside a retry child, without a shared orchestration scope, or when duplicate UIDs make correlation ambiguous, the reporter generates independent execution IDs.- Each physical attempt receives its own UUID. Earlier attempts represented in
retryAttemptsuse the standardattemptIdfield. CTRF 0.1.0 does not allowattemptIdon the final test object, so that attempt's identity is carried inextra.mtpAttemptIdinstead; retry merging preserves it when promoting a raw result into history. Legacy reports without an attempt identity remain mergeable, but the merger omits their optionalattemptIdrather than treating an execution lifecycle ID as an attempt ID. - Retry consolidation uses both case identity and
executionId, preserving distinct lifecycles even when they share a framework UID. Legacy rows without an execution ID can be correlated only when their case identity is unique in each input report and does not span conflicting known lifecycles. Repeated case/lifecycle pairs within one report remain separate; ambiguous results are preserved rather than guessed into another test's retry history. extra.uidcontinues to carry the Microsoft.Testing.Platform UID for compatibility with reports produced before first-class CTRF identity fields were available.attachments[].pathis emitted unchanged as an opaque CTRF path value. It can be a local absolute file path and consumers must not assume that it is remotely accessible.
Documentation
For comprehensive documentation, see https://aka.ms/testingplatform.
For the versioned CTRF specification, see https://github.com/ctrf-io/ctrf/blob/v0.1.0/spec/ctrf.md.
Feedback & contributing
Microsoft.Testing.Platform is an open source project. Provide feedback or report issues in the microsoft/testfx GitHub repository.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Testing.Platform (>= 2.5.2 && < 3.0.0)
- System.Text.Json (>= 10.0.12)
-
net8.0
- Microsoft.Testing.Platform (>= 2.5.2 && < 3.0.0)
- System.Text.Json (>= 10.0.12)
-
net9.0
- Microsoft.Testing.Platform (>= 2.5.2 && < 3.0.0)
- System.Text.Json (>= 10.0.12)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-alpha.26527.6 | 48 | 10/27/2026 |
| 1.0.0-alpha.26507.8 | 8,402 | 10/7/2026 |
| 1.0.0-alpha.26506.1 | 75 | 10/6/2026 |
| 1.0.0-alpha.26466.3 | 386 | 9/16/2026 |
| 1.0.0-alpha.26452.8 | 942 | 9/2/2026 |
| 1.0.0-alpha.26377.5 | 16,743 | 7/28/2026 |
| 1.0.0-alpha.26363.8 | 86 | 7/13/2026 |
| 1.0.0-alpha.26358.12 | 106 | 7/8/2026 |
| 1.0.0-alpha.26357.13 | 111 | 7/7/2026 |
See the release notes at https://github.com/microsoft/testfx/blob/main/docs/Changelog-Platform.md#2.5.2.