Code coverage (or test coverage) is a measure reflecting the degree to which application source code is covered with tests. Knowing this information helps determine which subsets of application functionality are not properly tested and thus need to be covered with tests in priority manner. Code coverage doesn't express the quality of tests or application logic but instead serves as a guidance that can be used in prioritizing application development and testing activities.
Code coverage analysis
Code coverage analysis is therefore a process of executing automatic or manual test session on an application intended to obtain knowledge as to which parts of application source code are tested and which are not during this test session.
From the large variety of coverage metrics that exist, dotCover uses statement coverage. Statement coverage reports whether each statement in application code is executed by application tests. This metric ensures sensible coverage analysis results in most cases but it also has its limitations: for example, ternary operators are assumed fully covered even if only one branch is effectively executed.
Coverage snapshot is a data unit that contains coverage analysis results for a particular unit test session or for a manual test session. dotCover provides graphical representation of coverages snapshots in the Coverage Results Browser Window or in the Coverage area of the Unit Test Sessions Window/ Continuous Testing Session Window and a storage format used to save and reopen coverage snapshots in dotCover. For more information, see What is Coverage Snapshot?.
Unit test session
Unit test session is a collection of unit tests that can be run simultaneously. You can view currently opened unit test sessions in the Unit Test Sessions Window. Each unit test session can be executed in the coverage mode so the code coverage is recorded during the execution. For more information, see Using Unit Test Sessions.
Unit test runner
Unit test runner is a component that runs target assemblies and executes unit tests on them. It supports several unit test frameworks. Unit test runner is launched every time you run or debug unit tests and when you use dotCover Console Runner. For more information, see Execution and Coverage Analysis of Unit Tests.
Manual test session
In terms of dotCover, a Manual test session is a period of execution of a particular set of manual test cases, during which the code coverage is recorded. After a manual test session under dotCover, a QA engineer can retrospectively discover which parts of the application code have been involved in the session and which have not been covered. For more information, see Coverage Analysis of Manual Test Sessions.
Coverage filter is a set of rules that tells which parts of application code should be included or excluded from the coverage analysis. For more information, see Setting up Coverage Filters.
Symbol files (PDB)
Locating symbol files (PDB) for the target binaries is vital for calculating coverage. If you cover unit tests or cover the startup project, dotCover easily locates symbol files using the structure of the current solution. However, if you cover an external application or if you run unit tests with the console runner there may be cases when dotCover fails to locate symbol files with default settings. In this cases, you can configure additional ways of searching for symbol files for external applications and for the console runner.