Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion docs/docs/extensions/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@ As TUnit is built on top of Microsoft.Testing.Platform, it can tap into generic

## Built-In Extensions

The following extensions are **automatically included** when you install the **TUnit** meta package. You don't need to install them separately!
The following extensions are **automatically included** when you install the **TUnit** meta package:

- **Code Coverage** - via `Microsoft.Testing.Extensions.CodeCoverage`
- **TRX Test Reports** - via `Microsoft.Testing.Extensions.TrxReport`
- **Telemetry** - via `Microsoft.Testing.Extensions.Telemetry`

:::tip Opting Out of Built-In Extensions
If you don't want these extensions, you can reference `TUnit.Engine` and `TUnit.Assertions` packages separately instead of the `TUnit` meta package.

```xml
<!-- Instead of the TUnit meta package -->
<PackageReference Include="TUnit.Engine" Version="x.x.x" />
<PackageReference Include="TUnit.Assertions" Version="x.x.x" />
```
:::

### Code Coverage

Expand Down Expand Up @@ -116,6 +130,33 @@ dotnet run --configuration Release --results-directory ./reports --report-trx --

---

### Telemetry

Telemetry is provided via the `Microsoft.Testing.Extensions.Telemetry` NuGet package.

**✅ Included automatically with the TUnit package**

This extension enables Microsoft to collect anonymous usage metrics to help improve the testing platform. No personal data or source code is collected.

#### Opting Out

You can disable telemetry by setting an environment variable:

```bash
# Linux/macOS
export TESTINGPLATFORM_TELEMETRY_OPTOUT=1

# Windows
set TESTINGPLATFORM_TELEMETRY_OPTOUT=1
```

Alternatively, you can use `DOTNET_CLI_TELEMETRY_OPTOUT=1` which also disables .NET SDK telemetry.

**📚 More Resources:**
- [Microsoft.Testing.Platform Telemetry Documentation](https://learn.microsoft.com/en-us/dotnet/core/testing/microsoft-testing-platform-telemetry)

---

## Optional Extensions

These extensions are **not** included with the TUnit package and must be installed manually if needed.
Expand Down
Loading