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.
Source
Geen opmerkingen:
Een reactie posten