How to does code coverage test for Windows service

Source: Internet
Author: User

First, instrument the EXE or DLL by command

Vsinstr-coverage the Dll/exe

Second, start the Performance Monitor

Vsperfcmd.exe/start:coverage/output: "D:\Latest.Coverage"/cs/user: "Everyone"

At this time, we could check the status by running command:

Vsperfcmd.exe/status

Third, start the Windows service and execute the test scenario.

Fourth, shut down the Performance Monitor tool by

Vsperfcmd.exe/shutdown

Trouble shooting:

On the "machines", could not get the coverage, instead it shows message:

Empty results Generated:no binaries were instrumented. Make sure the tests ran, required binaries were loaded, had matching symbol files, and were not excluded through custom SE Ttings. For more information see http://go.microsoft.com/fwlink/?LinkID=253731

And in the event view, have error with Source:vsperf

Unable to connect to monitor. Make sure the monitor was started and in the correct mode.

Resolving by:

Run the above command from the tools for x64 machines, it located at

C:\Program Files (x86) \microsoft Visual Studio 12.0\team tools\performance tools\x64

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.