zoukankan      html  css  js  c++  java
  • 测试web开源项目时如何收集代码覆盖率

    在对一个产品做功能full test pass的时候,常常需要知道哪些地方没有被测到,以便针对性地增加测试用例,使得测试更全面,收集代码覆盖率就是一个找出这些testing hole的很好的方法,以下是测试web开源项目时收集代码覆盖率的具体步骤:

    1. 获取最新源代码,部署到iis,编译成功;

    2. 停止iis服务;

    3. Instrument要测试模块的dll和exe文件;
        set VsInstr="%VSINSTALLDIR%\Team Tools\Performance Tools\VsInstr.exe"
        %VsInstr% -coverage [product].exe

    4. 启动profle monitor;
        set VsPerfCmd="%VSINSTALLDIR%\Team Tools\Performance Tools\VSPerfCmd.exe"
        %VsPerfCmd% /START:COVERAGE /OUTPUT:"%path%\[product].coverage" /CS

    5. 重启iis服务;

    6. 执行测试用例;

    7. 所有case执行完毕后,关闭profile monitor。
        停止iis服务,运行 %VsPerfCmd% /shutdown

    在VS中打开[product].coverage,就可以看到源代码哪些覆盖到哪些没有覆盖到了。


     

  • 相关阅读:
    POJ 3093 Margaritas on the River Walk(背包)
    BZOJ 2287 【POJ Challenge】消失之物(DP+容斥)
    WC2017 Day1
    WC2017 Day0
    WC2017 Conclusion
    WC2017 Day6
    UOJ #58 糖果公园
    WC2017 Day5
    codevs 1946 阿狸的打字机
    HDU 2457 DNA_repair
  • 原文地址:https://www.cnblogs.com/sanmao_net/p/2184221.html
Copyright © 2011-2022 走看看