code-coverage

Conditional Regular Expression to exclude certain directories

烈酒焚心 提交于 2019-12-24 08:35:01
问题 I'd like to exclude certain directories of code from getting analyzed for code coverage. I'm using the LCOV tool which has a --exclude parameter which I can include a regular expression to exclude files, packages, etc... What would be the regular expression to exclude all directions except for Src/High/SS/FormCalc: Src/High/SS/ATG_Help Src/High/SS/ConvCalc Src/High/SS/ConvX Src/High/SS/EFiling Src/High/SS/Edit Src/High/SS/FormCalc Src/High/SS/FormDisp Src/High/SS/Image Src/High/SS/Import Src

Why does CMake neglects source files?

萝らか妹 提交于 2019-12-24 07:56:23
问题 The CMakeLists.txt file I wrote, unfortunately, create coverage statistics solely for header files and test scripts, but not for the source files. I would, however, like to heave coverage information for the source files. What am I doing wrong? As an example, here is the header file: class.h #include <string> #include <vector> #include <iostream> class StrVec{ public: StrVec(const std::string&); void print() {std::cout << vec[0] << std::endl;} private: std::vector<std::string> vec; }; The

Missing code coverage tab in VS localtestrun.testrunconfig?

半世苍凉 提交于 2019-12-24 07:27:27
问题 I am relatively new to unit testing and was attempting to add some code coverage to my unit tests. Yet i can't find the code coverage tab in Visual Studio 2008 in the localtestrun.testrunconfig, is there any missing Add-in or tool? Thanks, DMS 回答1: As I understand "Code Coverage" is available only in "bigger" editions of Visual Studio 2008. In other words, this feature is NOT available in the "Visual Studio 2008 Professional Edition". Which edition of Visual Studio 2008 are you using ? MSDN

Low branch coverage especially when using 3rd party libs. ex boost

限于喜欢 提交于 2019-12-24 06:37:41
问题 I have problems understanding branch coverage in c++. Even for a simple program the branch coverage is 50%. When i use boost the branch coverage is below 20%. Could someone explain me why this is happening? I am using -fno-exceptions -g -O0 -fprofile-arcs -ftest-coverage -fPIC -Wall compiler flags and gcovr for generating the report. I also tried lcov with exactly the same result 回答1: This is just general C++ compiler weirdness. Both gcovr and lcov depend on the coverage data that GCC

CodeCoverage with PHPunit not generating

巧了我就是萌 提交于 2019-12-24 04:57:15
问题 PHPunit 3.7.1 PHP 5.3.14 Windows 7 Using cmd I "cd" into the dir where phpunit.xml lives and run phpunit -c phpunit.xml but that dosen't generate any code coverage. phpunit.xml: <phpunit bootstrap="./bootstrap.php" verbose="true" > <testsuites> <testsuite name="Test Suite"> <directory suffix=".php">./Base/src/</directory> <filter> <whitelist addUncoveredFilesFromWhitelist="true"> <directory suffix=".php">../src</directory> <exclude> <directory suffix=".php">../../vendor</directory> </exclude>

CodeCoverage with PHPunit not generating

蹲街弑〆低调 提交于 2019-12-24 04:57:07
问题 PHPunit 3.7.1 PHP 5.3.14 Windows 7 Using cmd I "cd" into the dir where phpunit.xml lives and run phpunit -c phpunit.xml but that dosen't generate any code coverage. phpunit.xml: <phpunit bootstrap="./bootstrap.php" verbose="true" > <testsuites> <testsuite name="Test Suite"> <directory suffix=".php">./Base/src/</directory> <filter> <whitelist addUncoveredFilesFromWhitelist="true"> <directory suffix=".php">../src</directory> <exclude> <directory suffix=".php">../../vendor</directory> </exclude>

PartCover producing empty xml when upgrading applications to .Net 4.0

纵然是瞬间 提交于 2019-12-24 01:26:17
问题 We have been running PartCover on applications, and they were producing xml reports just fine. However, we upgraded all our applications from .Net 3.5 to .Net 4.0, and now, PartCover just produces an empty XML file. I tried upgrading to latest NUnit and latest PartCover, but that did not help. Is there anything else I can do to try to resolve this issue? We've been using code coverage frequently as part of our process, and need to resolve. This is the command: "C:\Program Files (x86)

Convert MSTest code covarage results in to XML

僤鯓⒐⒋嵵緔 提交于 2019-12-24 00:07:32
问题 I am using this code to convert MSTest code covarage results to XML format , I added reference to Microsoft.VisualStudio.Coverage.Analysis.dll bu there is no class called CoverageInfoManager . I am using VS 2010. static void Main(string[] args) { String coveragepath = System.IO.Path.GetDirectoryName(args[0]); CoverageInfoManager.SymPath = coveragepath; CoverageInfoManager.ExePath = coveragepath; // Create a coverage info object from the file String coveragefile = System.IO.Path.GetFullPath

difference between code coverage and profiling

醉酒当歌 提交于 2019-12-23 23:08:59
问题 What is difference between code code coverage and profiling. Which is the best open source tool for code coverage. 回答1: Coverage is important to see which parts of the code have not been run. In my experience it has to be accumulated over multiple use cases, because any single run of the software will only use some of the code. Profiling means different things at different times. Sometimes it means measuring performance. Sometimes it means diagnosing memory leaks. Sometimes it means getting

MSTest code coverage

大兔子大兔子 提交于 2019-12-23 19:10:31
问题 I have a test project for a web service and, when I run tests in debug mode, everything works ok. However, when I just run tests, I get following error, for a referenced assembly that I try to obtain code coverage: Class Initialization method WebServiceTest.wstest.MyClassInitialize threw exception. System.IO.FileLoadException: System.IO.FileLoadException: Could not load file or assembly 'TestAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=57f286581e1d278a' or one of its