visual studio 2012 - Can we get native C++ code coverage in VS2012 or VS2010 without MSTest? -
we measure code coverage our own automated regression test scheme run on big native app. sophisticated, scripted test scheme using inbuilt scripting of our app. has thousands of tests , not going replaced mstest unit tests.
whilst we're using vs2012 (premium) ide still compiled vs2010 compilers & libraries. alter sooner if prerequisite getting code coverage going.
we can separate builds - instrumenting not problem.
i'm confused reading ms documentation seems start assumption you're running unit tests using inbuilt test framework. that's when i'm not struggling find stuff talks native back upwards alm in first place!
thanks
visual studio 2012's code coverage tool exclusively separate test execution scheme (full disclosure: wrote it, team inherited after left microsoft removed useful functionality). rewritten ground in vs 2012 dynamically instrument native (x86 , x86-64) , managed code (.net , silverlight) when loads process instead of modifying executables on disk.
you can find codecoverage.exe in "%programfiles%\microsoft visual studio 11.0\team tools\dynamic code coverage tools".
to collect data:
codecoverage.exe collect /output:foo.coverage foo.exe foos_args
a configuration file (there's default 1 in directory called codecoverage.config) can specified command collection.
to analyze coverage data, can open foo.coverage in visual studio 2012 or utilize coverage tool analysis:
codecoverage.exe analyze /output:results.xml foo.coverage
note: instrumentation take place, .pdb files must discovered modules. since building 2010, may not work 2012's dia may have rebuild 2012's toolset. if not seeing modules expect in coverage analysis, pass /include_skipped_modules
analyze command; there "reason" attribute telling why module skipped (excluded, no debug information, etc.).
edit: also, unlike previous versions of visual studio, 2012's coverage file format self-contained. modules , .pdbs don't need nowadays @ analysis time.
c++ visual-studio-2012 code-coverage
No comments:
Post a Comment