Share via


Using Code Coverage with Manual Testing

When talking about code coverage we normally think about unit testing. One of the reasons may be, that the Team System Testing Infrastructure automatically enables code coverage for unit tests.

Never less you can use code coverage for all other test types too, this also includes manual tests.

Where would you want to have this: e.g. when you run a set of manual tests and need to be sure to really cover all code in a specific area. You would for sure never use code coverage on manual tests for a broad scenario, there automated tests really should be in place.

How to set this up:
Because of the flexible Team System Testing Infrastructure design you set this up just the way you do it with other tests you want to instrument:
Open up the “test run Configuration” by double clicking the file “localtestrun.testrunconfig” under the solution items. There you just navigate to code coverage and add/mark the assemblies you want to instrument.

Afterwards start the test and then be sure to start the Application you are testing in the assembly path you defined during add/mark, normally <solution directory>\<project>\bin\debug.

Now just start testing the application to satisfy the manual test. Before you Apply the manual test be sure to shut down the application, for code coverage results to save.

Documentation details can be found here:
https://msdn2.microsoft.com/en-us/library/ms182616.aspx