JetBrains Rider 2025.3 Help

Set up coverage filters

Coverage filters let you control which assemblies and symbols are included in or excluded from coverage analysis. Filters help you:

  • Reduce analysis time by skipping irrelevant code.

  • Focus results on your project or working area.

  • Exclude test helpers, third-party libraries, or generated code.

Filter types:

Runtime coverage filters

JetBrains Rider applies these filters during a coverage session. Use these filters to exclude unnecessary code from analysis and reduce coverage session time.

You can configure runtime filters in JetBrains Rider settings or using the command line.

Filters of coverage results

JetBrains Rider applies these filters to coverage results (coverage tree) after the coverage session is over. Use them to exclude nodes you don't want to see at the moment. Learn more

Apply runtime coverage filters

Use JetBrains Rider settings to specify runtime coverage filters for a specific namespace or attribute.

As filters are applied in runtime, JetBrains Rider does not include the filtered items in the coverage snapshot and does not show them in the Unit Tests Coverage window.

Add a runtime coverage filter

  1. Open the filter settings page in Rider settings: Build, Execution, Deployment | dotCover | Filtering.

  2. In Runtime coverage filters, click Add filter Add ... next to the required filter rule:

    • Do not analyze code in assemblies – exclude specific assemblies (e.g. *.Tests). This is useful for test utilities or external SDKs.

    • Do not analyze code marked with attributes – exclude classes, methods, or properties marked with a specific attribute. Specify a fully qualified attribute name, for example, System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute or *.ExcludeFromCodeCoverageAttribute.

    You can use asterisk wildcards when specifying code item names in a filter: * (asterisk) represents zero or more characters.

  3. Click Save.

Apply filters to coverage results

JetBrains Rider applies these filters to coverage results after a coverage session is over. Use result filters to temporarily hide items from the coverage tree in the UI. These filters do not affect analysis or the generated snapshot.

Exclude a node (namespace, class, class member) from coverage results

  1. Open the Unit Tests Coverage window.

  2. Select a node and in the context menu select:

    • Exclude from Coverage Results to exclude the node from the current results.

    • Exclude All But This to leave only the selected node in the coverage tree.

Show the excluded nodes back

02 July 2025