Microsoft.Testing.Extensions.CtrfReport
This package extends Microsoft Testing Platform to produce test reports in the Common Test Report Format (CTRF, https://ctrf.io). Microsoft Testing is a set of platform, framework and protocol intended to make it possible to run any test on any target or device.
Install
| Product | Versions |
|---|---|
| .NET | |
| .NET Standard |
README
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
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.executionIdis a new UUID for each reported CTRF execution lifecycle. Earlier attempts represented inretryAttemptsreceive their ownattemptId.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.
Changes from Previous Version
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.