-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoverlet.runsettings
More file actions
49 lines (47 loc) · 2.54 KB
/
Copy pathcoverlet.runsettings
File metadata and controls
49 lines (47 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="XPlat Code Coverage">
<Configuration>
<Format>cobertura</Format>
<ExcludeByFile>**/bin/**/*.cs;**/obj/**/*.cs</ExcludeByFile>
<ExcludeByAttribute>ExcludeFromCodeCoverageAttribute</ExcludeByAttribute>
<!--
Exclude:
- AutoGeneratedProgram: the implicit `<Main>$` entry point the .NET
SDK emits for test projects. Never executed by user code, and it
shows up as 0% in every test assembly.
- *.TestModels.*: data-holder POCOs that exist only to give tests a
shape to populate. A property no test happens to read is not a
real coverage gap; the test-assembly instrumentation below is for
surfacing dead test *logic* (helpers, dead branches in test
bodies), not dead POCO properties.
- *Fixture (class name ends in "Fixture"): xUnit collection fixtures
whose catch paths are environment-dependent — e.g. a fixture that
swallows "container runtime unavailable" only executes that branch
on runners without it, while on a runner that has it the happy
path runs and the catch body is unreachable. Gating such a class
at the coverage threshold would force pretending to test paths
that cannot fire in that runner's environment.
Match on the class-name suffix, NOT on a namespace such as
`*.Fixtures.*`: a namespace filter also sweeps in helper types
that live alongside fixtures and do have logic worth covering.
Fakes/stubs are deliberately NOT excluded — they contain logic that
should be exercised by the tests using them.
-->
<Exclude>[*]AutoGeneratedProgram,[*]*.TestModels.*,[*]*Fixture</Exclude>
<!--
Instrument the test assembly itself in addition to the source
assembly. Surfaces dead test helpers, unused fakes and unused
test-model branches so they can be cleaned up or covered. The
ExcludeFromCodeCoverage attribute still opts a type out where it is
genuinely warranted (e.g. attribute-only polyfill shims with no
executable body).
-->
<IncludeTestAssembly>true</IncludeTestAssembly>
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>