You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-11Lines changed: 57 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,7 @@ or download from [releases](https://github.com/FortuneN/FineCodeCoverage/release
8
8
---
9
9
## Prerequisites
10
10
11
-
Only that the test adapters are nuget packages. For instance, the NUnit Test Adapter extension is not sufficient.
12
-
11
+
For .Net - that the test adapters are nuget packages. For instance, the NUnit Test Adapter extension is not sufficient.
13
12
14
13
---
15
14
@@ -21,10 +20,10 @@ tool for most developers. It is currently in Beta.
21
20
22
21
With the old coverage it was possible for FCC to provide an abstraction over each tool's exclusion / inclusion options. This abstraction does not work for MS code coverage.
23
22
Thus you will find that there are separate configuration options for Ms coverage vs old coverage and options that are common to the two.
24
-
Configuration is available with Visual Studio optionsand project msbuild properties. All visual studio settings can be overridden from test project settings and some settings
25
-
can only be set in project files.
23
+
Configuration is ( mostly ) determined from Visual Studio options, finecodecoverage-settings.xml files and project msbuild properties. All of these settings are optional.
24
+
For options that have a project scope, these settings form a hierarchy where lower levels override or, for collections, override or merge with the level above. This is described in detail further on.
26
25
27
-
Regardless of the coverage tool employed the process begins with FCC reacting to the test explorer in visual studio. One of the 3 coverage tools provides the coverage results that are presented as a single unified report in the Fine Code Coverage Tool Window. The report shows line and branch coverage and risk hotspots with the facility to open your class files that will have coloured margins to indicate uncovered or partially covered code.
26
+
Regardless of the coverage tool employed the process begins with FCC reacting to the test explorer in visual studio. One of the 3 coverage tools provides the coverage results that are presented as a single unified report in the Fine Code Coverage Tool Window. The report shows line and branch coverage and risk hotspots with the facility to open your class files, that will have coloured margins to indicate uncovered or partially covered code.
28
27
This coverage is not dynamic and represents the coverage obtained from the last time you executed tests. When the coverage becomes outdated, you can click the 'FCC Clear UI' button in Tools or run coverage again.
29
28
30
29
Details of how FCC is progressing with code coverage can be found in the Coverage Log tab in the Fine Code Coverage Tool Window with more detailed logs in the FCC Output Window Pane. If you experience issues then providing the logs from the output window will help to understand the nature of the problem.
@@ -35,6 +34,8 @@ With the old coverage FCC needed to copy your test dll and dependencies and run
35
34
The old coverage would wait until tests have finished before starting the coverage tool to re-run all tests. This is not necessary with ms code coverage.
36
35
The old coverage was based upon every test. Ms code coverage is coverage from the tests you select in the test explorer.
37
36
37
+
**Supports C++ !** Note that FCC has not been properly tested with C++ projects but with a simple C++ class, tested with Google Test, FCC provides coverage.
38
+
38
39
## How to utilize MS Code Coverage with FCC ?
39
40
40
41
Firstly you need to change the RunMsCodeCoverage option from No.
@@ -48,11 +49,11 @@ FCC does not require you to do this. If you do not provide a runsettings and Ru
48
49
## Run settings generation from template
49
50
50
51
FCC includes the ms code coverage package and will create the necessary runsettings file for each test project being run from the test explorer window.
51
-
The exclusions and inclusions will come from visual studio options or from the project file in a similar manner to the old coverage. As ms code coverage uses regex and has different methods of exclusion / inclusion to
52
-
Coverlet and OpenCover there are ms specific Visual Studio options and project elements.
52
+
The exclusions and inclusions will come from the combined settings, in a similar manner to the old coverage. As ms code coverage uses regex and has different methods of exclusion / inclusion to
53
+
Coverlet and OpenCover there are ms specific Visual Studio options and associated elements.
53
54
54
55
As FCC provides a runsettings file for each test project ( if you have not provided a solution wide or project specific ) it has to write the RunSettingsFilePath element in the project file.
55
-
Although FCC removes this element from the project file it will still show as git modified.
56
+
Although FCC clears the value of this element from the project file it is still present.
56
57
57
58
FCC creates the runsettings from a template using string replacement. If so desired you can provide your own templates. FCC will look for fcc-ms-runsettings-template.xml in the project directory or the solution directory.
58
59
Your template needs to be a valid xml document but does not need to supply all of the run settings elements. FCC will add the replaceable ResultsDirectory and TestAdaptersPaths ( and the container RunConfiguration element if necessary)
@@ -108,10 +109,42 @@ Run a(some) unit test(s) and ...
0 commit comments