Your test configuration

TestDetta narrows your test runs. It never widens or changes them: a test your configuration excludes stays excluded, and coverage maps are recorded under your own settings.

What TestDetta adds to a run

What TestDetta keeps

Left alone, dotnet test lets some of these replace your own configuration. TestDetta combines them instead:

Your configurationWhat dotnet test alone would doWhat TestDetta does
VSTestTestCaseFilter in the project file, such as Category!=IntegrationA --filter on the command line replaces it: excluded tests runRuns (your filter)&(its class filter)
--filter in your own dotnet test argumentsTakes one --filter onlyRuns (your filter)&(its class filter)
A run settings file (RunSettingsFilePath, VSTestSetting or your --settings): its TestCaseFilter, EnvironmentVariables, TestRunParameters, data collectors, timeoutsAnother --settings replaces the whole fileRecords under a copy of your file with only its own elements added; your filter, variables and parameters stay
TestingPlatformCommandLineArguments (Microsoft.Testing.Platform), such as --filter-not-trait category=failingApplies it to every runLeaves it to the platform, and does not repeat an option you already set once

When a selected project runs completely, TestDetta adds no filter, and your configuration applies exactly as in your own runs.

Give TestDetta your CI's arguments

Pass the same dotnet test arguments your own test job uses, both when tests run and when maps are recorded:

td test --base origin/main -- --filter "Category!=Integration" --settings ci.runsettings
td record -- --filter "Category!=Integration" --settings ci.runsettings

In GitHub Actions, the dotnet-test-args input does this in every mode, record mode included. Options a recording controls itself (-c, -f, --no-build, loggers, the results directory and report options) keep TestDetta's values while recording; everything else runs as you give it.

A -f <tfm> among the arguments of td test also narrows the selection: the run loads only that framework's builds, so a change compiled only for other frameworks (code under an #if that framework leaves out) selects nothing in it. If your test projects target several frameworks, run every framework somewhere, for example in a nightly full run; see Limitations.

When a filter cannot be combined

Some filters cannot be joined with a class filter: an xUnit v3 query filter (--filter-query) or class filter of your own, and a TUnit tree-node filter. TestDetta then runs the whole test project under your filter: it runs more, never what your filter leaves out. The job summary says so for that project.

Check what was kept

Before the tests run, the console names each test project whose own configuration was kept, for example tests/Shop.Tests/Shop.Tests.csproj: your test case filter Category!=Integration, run settings tests/ci.runsettings kept in every run. The job summary lists the same, and -v writes the exact dotnet test command of each run.

If your build or CI sets test arguments in a way not listed here (an Arcade property, a wrapper script around dotnet test), pass them through dotnet-test-args or after --, so TestDetta sees what your runs really do.