code-coverage

How to use nose coverage with --timid flag

I'd like to run "nosetests --with-coverage" using Ned Batchelder's coverage module, but passing the coverage module the --timid flag. Is there a way (e.g. setting an environment variable) to make coverage run with --timid? ...

Code Coverage tool for BlackBerry

I'm looking for a code coverage tool that I can use with a BlackBerry application. I'm using J2ME-Unit for Unit Testing and I want to see how much of my code is being covered by my tests. I've tried using Cobertura for J2ME but after days of wrestling with it I failed to get any results from it. (I believe that the instrumentation is un...

How to use EMMA code coverage in android.

Hi all, Im new to EMMA, i dont know how to use this for android system. Can anyone please give a sample for using this with android. Thanks a lot. ...

Minimum Acceptable Code Coverage Numbers in the real world.

Hi, I am in the middle of putting together some guidelines around unit test code coverage and I want to specify a number that really makes sense. It's easy to repeat the 100% mantra that I see all over the internet without considering the cost benefit analysis and when diminishing returns actually sets in. I solicit comments from person...

Partial coverage of a return statement in C++/CLI

I have C++/CLI code and I'm using Visual Studio 2008 Team Suite Code Coverage. The code header: // Library.h #pragma once #include <string> using namespace System; namespace Library { public ref class MyClass { public: static void MyFoo(); static std::string Foo(); }; } The code implementation: #include "Libr...

TFS and code coverage for web application (MVC) assemblies not working

I've got an MVC web application with associated controller tests that run under a TFS build as per normal. I can see the tests running and passing in the build log and they appear in the "Result details for Any CPU/Release" section of the build I also have a number of other assemblies with associated tests that are running in the same ...

Cannot redeclare class error when generating PHPUnit code coverage report

Starting a project with Zend Framework 1.10 and Doctrine 2 (Beta1). I am using namespaces in my own library code. When generating code coverage reports I get a Fatal Error about Redeclaring a class. To provide more info, I've commented out the xdebug_disable() call in my phpunit executable so you can see the function trace (disabled loc...

Identifying which tests provide coverage in VS2010 code coverage results

Does anyone know of an easy way to work backwards from the VS2010 code coverage in-file highlighting to the test that provides the coverage? I have a file with one method covered and another not but looking through my tests I can't spot the one providing the current coverage. It would be great to be able to navigate back from the code hi...

Code coverage tools that can be used on .NET 4.0 assemblies

We use Xunit.net as our unit test framework for use on our .NET4 assemblies. We have it integrated into our TFS 2010 team builds quite successfully. I now want to add code coverage to the nightly builds as well. Does anyone have a list of coverage tools that work on 4.0 assemblies and could be integrated into our automated builds? ...

Why don't I get code coverage results for C++/CLI project in Visual Studio 2010?

I've recently upgrade my solution to Visual Studio 2010. I have 4 projects I want to cover using unit tests - 3 C# and 1 C++/CLI. I get coverage for the C# projects but not for the C++/CLI project. I did get for all of them in Visual Studio 2008. I've configured the assemblies using testrunconfig -> Data and Diagnostics -> Code Cover...

How do I get code coverage of Perl CGI script when executed by Selenium?

I'm using Eclipse EPIC IDE to write some Perl CGI scripts which call some Perl modules that I have also written. The EPIC IDE lets me configure a Perl CGI "run configuration" which runs my CGI script. And then I've got Selenium set up and one of my unit test files runs some Selenium commands to run my cgi script through its paces. But...

Including uncovered files in Devel::Cover reports

I have a project setup like this: bin/fizzbuzz-game.pl lib/FizzBuzz.pm test/TestFizzBuzz.pm test/TestFizzBuzz.t When I run coverage on this, using perl -MDevel::Cover=-db,/tmp/cover_db test/*.t ... I get the following output: ----------------------------------- ------ ------ ------ ------ ------ ------ File ...

Running NUnit tests in Visual Studio 2010 with code coverage

We have recently upgraded from Visual Studio 2008 to Visual Studio 2010. As part of our code base, we have a very large set of NUnit tests. We would like to be able to run these unit tests within Visual Studio, but with code coverage enabled. We have ReSharper, so can run the tests within Visual Studio, but it does not allow the code co...

Can I force Perl Devel::Cover to generate a coverage report if I killed the build testcover process before it was finished?

If I am able to start up Devel::Cover successfully and it starts to collect data in the cover_db directory, can I then kill the process and then after the fact get Devel::Cover or some other utility to process those binary Devel::Cover run files and structure files into the HTML coverage report? To ask the question another way ... Can...

Is there a free code coverage tool suitable for use with .NET 4 and NUnit?

Is there a free code coverage tool suitable for use with .NET 4 and NUnit that runs from the command line (and is thus suitable for use on a build server)? Please note that any tools that require editions of Visual Studio higher than Professional are not appropriate in this case. I am asking this question because I can't get NCover 1.5...

Code coverage test in Visual Studio 2010? How?

Hello, I have a simple project on C#.NET and have written it in Visual Studio 2010. I am a newbie in C# and Visual Studio. I have written some unit tests, and they pass ok, but how can I test code coverage? Thanks in advance. ...

eclemma - how to ignore source

Hi, I'm using junit/eclemma; it works great, except I'd like to instruct eclemma to ignore certain methods or classes. For example, how would i instruct eclemma to ignore getters/setters. Thanks in advance! ...

Un able to run MSTest Tests with code coverage enabled while using NHibernate

i'm unable to run MSTest Tests with code coverage enabled while using NHibernate i get the following error message Unit Test Adapter threw exception: Type is not resolved for member 'NHibernate.Cfg.HibernateConfigException,NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4'.. edit : Same thing...

Code coverage (c++ code execution path)

Let's say I have this code: int function(bool b) { // execution path 1 int ret = 0; if(b) { // execution path 2 ret = 55; } else { // execution path 3 ret = 120; } return ret; } I need some sort of a mechanism to make sure that the code has gone in any possible path, ...

What block is not being tested in my test method? (VS08 Test Framework)

I have the following code: private void SetControlNumbers() { string controlString = ""; int numberLength = PersonNummer.Length; switch (numberLength) { case (10) : controlString = PersonNummer.Substring(6, 4); break; case (11) : ...