code-coverage

Code coverage in Win32 app

We are just about to start a new project. The Proof of Concept (PoC) for this project was done simply using Win32. The plan is/was to flesh out the PoC, tidy the uglier parts and meet the requirements set by the project owners. One of the requirements for the actual project is 100% code coverage but I can see problems ahead: How can I ...

VS2008 web service code coverage

Hi, I have written a test method for a web service in VS2008, using visual studio test framework. Everything works fine until I enable code coverage for the web service dll in localtestrun.testrunconfig. Then, when I run the test, I get the result "Not executed". Could you give me an idea for this? Thank you ...

PartCover code details

I am using PartCover 2.2/2.3(trying with both) on win 7 x64. After generating report and selecting view coverage details, I can see for each method the code coverage. When I click on a method I see on the right list with block, block length, visit count and has source(set to yes). I am using the money project from NUnit 2.5.2 samples. Ho...

EclEmma JAVA Code coverage - Unable to coverage service layer of RESTful Webservice

I am using EMMA eclipse plugin to generate code coverage reports. My application is a RESTFul webservice. Junits are written such that a client is created for the webservice and invoked with various inputs. However EMMA shows 0% coverage for the source folder. The test folder alone is covered. The application server(jetty server) is st...

C++ coverage tool that WORKS?!

Been searching for a good coverage tool for a while now. I'm with VC++ 2008. Tried already: NCover, PureCoverage, PartCover and a few others I can't remember their names. None works! Not even with a very basic console application that does almost nothing. Tried to get an evaluation copy from BullsEye and few more others - not only th...

Excluding standard directories from code coverage results with C++/CLI

I have a Visual Studio 2010 .NET 4 solution with C# projects and a C++/CLI project. I use Visual Studio's built in unit tests and code coverage. Other than the fact that Visual Studio 2010 coverage tool for C++/CLI projects seems to be much weaker than Visual Studio 2008 coverage tool, I get weird results. For example, I get uncovered...

MSTest code coverage

Hi, 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: Sys...

Visual Studios Team System 2008 Code Coverage Window Closes

Trying to run the code coverage tool in Visual Studios for a set of unit tests. Adam from Think First, Code Later has had the same problem: I wanted to get the code coverage metrics for the project. Naturally, I fire up the solution in Visual Studio 2008, go to the Test menu, click Edit Test Run Configurations, and click L...

Why is gcov creating Code Coverage data for STL Headers?

When I run gcov foo.cpp it not only generates the code coverage report for foo.cpp, but for all the STL headers used by foo.cpp. Is there a way to prevent this? It seems to ignore standard library headers like <ctime>. Edit Just ran across this post on the gcc mailing list: Re: gcc, gcov and STL ...

Coverage can't cover the public static void main method

Using Junit coverage, it can't cover public static void main method. How can i cover it? anyone can help me? urgent. Thanks ...

Why is the main method not covered?

main method: public static void main(String[] args) throws Exception { if (args.length != EXPECTED_NUMBER_OF_ARGUMENTS) { System.err.println("Usage - java XFRCompiler ConfigXML PackageXML XFR"); } String configXML = args[0]; String packageXML = args[1]; String xfr = args[2]; AutoConfigCompiler comp...

How can I run Gcov over an installed Cocoa application?

I have a Cocoa application which uses an installer. I want to be able to run code coverage over the code (after it has been installed). This is not the usual unit-test scenario where a single binary will run a suite of tests. Rather, the tests in question will interact with the UI and the app back-end whilst it is running, so I ideally ...

How to setup environment variables for gcov on iPhone

I have overcome all problems with setting up gcov on my iPhone project but now I am getting the following: profiling:/Users:Cannot create directory Does anyone have any suggestions as to what I might be doing wrong? I originally setup gcov following Google's instructions which can be found by Googling "UsingCoverStory" UPDATE: Okay, ...

How do code coverage tools work?

How do code coverage tools like NCover know what parts of the code were executed and what parts were not? ...

Unit tests and Test Runner problems under .Net 4.0

Hi there, We're trying to migrate a .Net 3.5 solution into .Net 4.0, but are experiencing complications with the testing frameworks that can operate using an assembly that is built using version 4.0 of the .Net Framework. Previously, we used NUnit 2.4.3.0 and NCover 1.5.8.0 within our NAnt scripts, but NUnit 2.4.3.0 doesn't like .Net 4...

How can I ensure good test-coverage of my big Python proejct

I have a very large python project with a very large test suite. Recently we have decided to quantify the quality of our test-coverage. I'm looking for a tool to automate the test coverage report generation. Ideally I'd like to have attractive, easy to read reports but I'd settle for less attractive reports if I could make it work quic...

Possible to combine code coverage results (VC++)

I am using VC++ 2005 and 2008 on a project. Now I want to see if the unit test cases cover all the code, and a found a problem. We use Boost.Test for unit testing, and each file is designed to test a particular function or method. Each file is compiled into a separate executable. I am able to view the results per executable in Visual S...

TDD and Code Coverage

I'm about to start looking into developing with the aid of code coverage, and I'm wondering how it typically fits in with test driven development. Is code coverage an afterthought? Does your process go something like Write a test for the functionality to be implemented Run test, make sure they fail Implement functionality Run test, ma...

PHPUnit code coverage report generation fails

Hi fellow stackers, I'm trying some supposedly nice features of PHPUnit, but I cannot generate a freakin' code coverage report. What I get is: rolf@dev ~/projects/current/tests $ scripts/phpunit --configuration $PROJECTS/current/tests/conf/inc/tests.xml [...] Generating code coverage report, this may take a moment. [...] Fatal error: ...

What tools are available for flex code coverage?

I have been trying to get Flex Cover to work correctly for some time but the problem we are encountering is that it only provides code coverage for classes that are currently being hit by our unit tests. How do we get flex cover to provide correct instrumentation for our entire source directory? I have tried several different compiler ...