码迷,mamicode.com
首页 > Windows程序 > 详细

How to do code coverage test for windows service

时间:2014-07-11 22:29:17      阅读:437      评论:0      收藏:0      [点我收藏+]

标签:style   http   color   os   art   for   

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 64 bit machines, you may 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 settings. For more information see http://go.microsoft.com/fwlink/?LinkID=253731    

and in the event view, has error with source: VSPERF 

Unable to connect to monitor.  Make sure the monitor is 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

 

 

 

How to do code coverage test for windows service,布布扣,bubuko.com

How to do code coverage test for windows service

标签:style   http   color   os   art   for   

原文地址:http://www.cnblogs.com/yonglianglee/p/3833114.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!