zoukankan      html  css  js  c++  java
  • How to do code coverage test for windows service

    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.0Team ToolsPerformance Toolsx64

  • 相关阅读:
    Go语言专题
    计算机网络专题
    分布式系统理论专题
    Scala语言专题
    Zookeeper专题
    Java虚拟机专题
    Java并发编程专题
    git使用指南
    Oracle查询今天、昨天、本周、上周、本月、上月数据
    python3 装饰器
  • 原文地址:https://www.cnblogs.com/yonglianglee/p/3833114.html
Copyright © 2011-2022 走看看