Install
| Product | Versions |
|---|---|
| .NET Standard |
README
JetBrains.dotCover.Framework
A support library for JetBrains dotCover that lives inside your solution and helps dotCover analyze your code with better precision. Provides per-test coverage support for test frameworks built on Microsoft.Testing.Platform.
Per-test coverage for Microsoft.Testing.Platform
Test frameworks built on Microsoft.Testing.Platform (for example, TUnit) run tests inside the test application process itself. To break a coverage snapshot down by test, dotCover needs to know when each test starts and finishes inside that process — this package provides exactly that bridge.
The package registers a Microsoft.Testing.Platform extension in your test application automatically at build time. During a test run the extension observes test lifecycle events and reports test boundaries to the dotCover engine, so that collected coverage data can be attributed to the test that produced it.
When the test application runs without dotCover (locally, in CI, under other tools), the extension is designed to be a no-op: it does not collect any data and is not expected to have an observable effect on test execution.
This capability is only needed for test applications built on Microsoft.Testing.Platform. VSTest-based test projects do not require it — dotCover supports them out of the box.
Getting started
Add the package to your test project:
dotnet add package JetBrains.dotCover.Framework
No code changes are needed when your test application uses the default, generated entry point. If you disabled it (GenerateTestingPlatformEntryPoint=false) and provide your own Main, register the extension manually:
JetBrains.dotCover.Framework.TestingPlatformBuilderHook.AddExtensions(testApplicationBuilder, args);
Then run coverage analysis as usual with any dotCover-enabled tool:
- JetBrains Rider: run tests with Cover Selected Unit Tests (or Cover All Tests).
- JetBrains ReSharper: run tests with Cover Unit Tests.
- dotCover command-line tools: cover the test application with
dotCover cover.
Requirements
- A test application based on Microsoft.Testing.Platform 2.3.0 or later (the extension registers automatically through the platform's MSBuild integration, which MTP-based test frameworks use by default).
- A version of JetBrains dotCover with Microsoft.Testing.Platform support (as part of Rider, ReSharper, or the command-line tools).
Known limitations
- To keep per-test attribution accurate, dotCover disables parallel test execution for covered runs on its own — no configuration changes are required on your side. Covered test runs may therefore take longer than regular runs.
Feedback
Report issues and feature requests to the dotCover issue tracker.
License
This package is distributed under the MIT license.
JetBrains and dotCover are trademarks of JetBrains s.r.o. The MIT license does not grant any rights to these trademarks or to the dotCover logo included in this package.
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.