Using the commandline you can instrument any .NET assembly, but beware of code signing as it might cause problems. Once the code is instrumtented, you need to get the "listener" running to collect the code coverage data generated, as follows:
- Open a VS command prompt
- Instrument your assembly by executing:
vsinstr /coverage Assemblyname.dll - Start the Code Coverage monitoring process by executing:
vsperfcmd /start:coverage /output:yourfilename.coverage - Run your Application that contains the instrumented code
- End the Code Coverage monitoring process by executing:
vsperfcmd /shutdown - Open the file "yourfilename.coverage" found in your application directory in Visual Studio to view the results.
1 comment:
Thanks for the great information, any idea if there is a way to get this .coverage file loaded into the TFSWarehouse so users can use the canned reports to view coverage information?
Regards,
Sean
Post a Comment