[英]Visual Studio 2012 C++ code coverage merge executables
My c++ unit tests use gtest framework so every test is a separate executable. 我的c ++单元测试使用gtest框架,因此每个测试都是一个单独的可执行文件。 I'm running the CodeCoverage.exe tool to get the raw coverage data of each executable run.
我正在运行CodeCoverage.exe工具来获取每个可执行文件运行的原始覆盖数据。 When I open the results in Visual Studio, each executable run appears in a separate branch and the results can't be merged together.
当我在Visual Studio中打开结果时,每个可执行文件运行都出现在一个单独的分支中,结果无法合并在一起。
Is there any way to make this work? 有没有办法让这项工作?
One thing I've tried is to specify /session:uniq
in the command line for both runs but that didn't have any effect. 我尝试过的一件事是在命令行中为两次运行指定
/session:uniq
,但这没有任何效果。
Does it help you to capture via vsperfcmd.exe? 它是否可以帮助您通过vsperfcmd.exe捕获?
/profile
flag specified to the linker /profile
标志构建gtest vsinstr.exe gtest.exe /COVERAGE
vsperfmon.exe /COVERAGE /OUTPUT:gtest.coverage
vsperfcmd.exe -shutdown
OK, this should have been a comment, but I don't have the permissions yet. 好吧,这应该是评论,但我还没有权限。 You can run all your unit tests with the macro: RUN_ALL_TESTS();
您可以使用宏运行所有单元测试:RUN_ALL_TESTS();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.