What runs everything
Most changes select a few test classes. Some cannot be narrowed down safely, so TestDetta runs a whole test project, or every project below a folder. This page lists them all, so a wide selection never comes as a surprise.
Build-wide files
These files change how every project below them builds. A change to one of them runs every test project in its folder and below it:
| File | Runs |
|---|---|
Directory.Build.props, Directory.Build.targets, Directory.Build.rsp | Every test project below it |
Directory.Solution.props, Directory.Solution.targets | Every test project below it |
global.json, NuGet.config, .editorconfig | Every test project below it |
Directory.Packages.props, only PackageVersion items changed | Only the test projects that reference a changed package, and those that depend on them |
Directory.Packages.props, anything else (a GlobalPackageReference, transitive pinning, properties) | Every test project below it |
Changes that run a whole test project
| Change | Why it cannot be narrowed |
|---|---|
The project file, or a .props or .targets file it imports | It can change how anything in the project builds. |
Any file in the project that is not C#, such as appsettings.json, a .resx or a test data file | No coverage map says who reads it. |
A global using or an assembly attribute | It applies to every file. |
| A C# change in code no declaration covers, for example under a preprocessor condition | There is no member to follow. |
| A changed type that nothing names, but that a framework could discover through reflection (controllers, message handlers, EF configurations) | Names and coverage cannot tell who finds it. |
| A change in an F# or Visual Basic project | Their code is not analysed. |
| A project used as an analyzer or source generator | Its effect is on compilation, not on calls. |
Each of these also runs every test project that depends on the one affected.
Coverage map situations
- An older map and build changes in between. When the map is a few commits older than your merge base and a build file or a configuration file changed in between, the affected test projects run completely.
--drift-fallback namedecides them by name instead. See the drift bridge. - Every class selected. A project whose classes are all selected runs without a filter.
- A filter that matches nothing. The project runs again without the filter, and TestDetta treats it as its own bug.
No map at all does not run everything: selection falls back to tracing by name, which is wider than coverage but still narrow.
Files that are ignored
A changed file outside every project folder, such as README.md, files under .github/ or a script at the root of the repository, belongs to no project and selects nothing. It is listed in the output as unmapped.
If your tests read a file that lives outside every project folder, a change to it will not select them. Keep such files inside the test project, or list them as its items, for example <None Include="..\..\testdata\**" CopyToOutputDirectory="PreserveNewest" />. Then the file belongs to the project wherever it lives, and changing or deleting it runs the project.
One exception: a source or build file that no project claims (.cs, .fs, .vb, .props, .targets, .projitems) counts as a build input of every project whose imports could not be fully resolved, so those run.