code-coverage

NCover 1.5.8 / NCoverExplorer 1.4.0.7 manual exclusions are very flaky

I haven't yet installed my license of NCover 3, and am still running 1.5.8 on my build server. I am trying to exclude full assemblies and specific classes that I don't want included in the report, because they are artificially lowering the coverage results. In NCoverExplorer, I was playing around with the options because there is a cov...

With gcov, is it possible to merge to .gcda files?

I have the same source files (C and Obj-C) being compiled into two targets: the unit test executable and the actual product (which then gets integration tested). The two targets build into different places, so the object files, .gcno and .gcda files are separate. Not all source files are compiled into the unit test, so not all objects wi...

Using phpunit, what should I do to have the code coverage report include the tests run via selenium?

The coverage information is created by xdebug but instead of the inclusion into the coverage report, it creates a file with the information for every test in the webroot of the application. I use the following setup: class SeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { public function __construct($name,array $data = a...

Code Coverage and Silverlight 4

Is there any way to get Code Coverage metrics for Silverlight 4? I have been trying to get this up and running for some time. For a while there was code coverage in the Silverlight Unit Test Framework, but to my understanding it is now broken. Any ideas on how I can pull off some code coverage metrics in my application? ...

Is it normal for gcov to peg the CPU at 100%

I'm running gcov (through lcov) over a medium-sized project. It's had the CPU at close to 100% for quite a while (not sure exactly how long, but over 30 minutes). The memory isn't ballooning. It seems to be stuck on one task. Is it normal for gcov to do this kind of thing? Edit No luck. Just had to exclude the piece of code that corre...

getting code coverage data from build machine

I'm able to get the data.coverage file when the solution is built through visual studio. But the file is not created while running the same on the build machine. I've enabled code coverage in the LocalTestRun.testrunconfig file. Do I have to do anything else to enable code coverage on the build machine? ...

Determining which tests cover a line of code

Is there a way to determine the set of unit tests that will potentially execute a given line of code? In other words, can you automatically determine not just whether a given line is covered, but the actual set of tests that cover it? Consider a big code base with, say, 50K unit tests. Clearly, it could take a LONG time to run them all-...

How to exlude files/exclude code blocks with code coverage from Netbeans with PHPUnit integration.

Requirements: Netbeans with PHPUnit(6.9) How to: Exclude lines in code coverage. Exclude code blocks(lines) in code covarage. ...

nosetests --cover-html does not generate html docs

I have installed nose for python 2.6 and it works fine , but I was trying use the --cover-html option to generate a html report. I typed the following command from the commandline nosetests --cover-html and nothing happend , it ran the tests but did not generate the html. Am i missing something ? I have python 2.6 , nose 0.11.3 , runni...

Unit testing infrastructure for a python module

Hi there, I'm writing a python module and I would like to unit test it. I am new to python and somewhat bamboozled by the options available. Currently, I would like to write my tests as doctests as I like the declarative rather than imperative style (however, feel free to disabuse me of this preference if it is misinformed). This rai...

Should I run my regression testing programs on both AMD and Intel chips?

Right now I plan to test on 32-bit, 64-bit, Windows XP Home, Windows XP Pro, Windows Vista Home Basic, Windows Vista Ultimate, Windows 7 Home Basic, and Windows 7 Ultimate ... all with the latest service pack. However, now I'm wondering if it's worthwhile to test on both AMD and Intel for all the listed scenarios above or would it be a...

unit testing - per test code coverage for java

We use use junit for unit testing our java code. Today we use cobertura to get coverage numbers. It does not have an easy way of getting per test coverage number. Is there a tool to get per test code coverage - commercial/free? (cobertura has a patch to get per test coverage numbers, out of date with latest cobertura). ...

How to cover exceptions in Visual Studio Code Coverage

I am new to code-coverage, and I am trying to get my unit tests to cover %100 of my code. My first question is, is this possible/feasible? My second, more specific question is, I have the following method: /// <summary> /// Clears frames, control groups, display groups /// </summary> public bool Clear() { try { this.Fr...

NCover code coverage result for deliberately failing tests

I have a couple of unit test helper extension methods, such as, IsNotEmpty(this string str) for which I have also written unit tests. The basic structure of these tests is that I have one test that verifies that the extension method passes and returns the expected result on a "good" input, and one that verifies that a fail exception is t...

PHPUnit coverage now incomplete as class' opening brace is not covered.

Hey everyone, I've been using PHPUnit to to do unit testing on a Symfony/Doctrine project I'm working on. It was working fine until yesterday when various classes dropped from 100% coverage to 98-99%. The reason for the change is because the opening left brace of these classes is no longer considered "covered" for some reason. Here's a s...

How to fail the build when there is new uncovered code?

Do any code coverage tools for Java allow you to cause the build to fail when new uncovered code gets introduced? I don't want to fail the build based on an arbitrary cutoff like 80% because in a large codebase, the actual coverage percentage rarely fluctuates. Also if coverage falls by 0.1% it's hard to tell which are the new uncovered ...

How can you get unittest2 and coverage.py working together?

In theory something like coverage run unit2 discover Should work but it currently just errors out. If you are a nose user which will be the equivalent of nosetests --with-coverage ...

Java : Which Code Coverage tool to use ?

Hi all, Here is what I want to do: 1) A running application has been instrumented. The byte code is clean - means that the tracing info should be added on the byte code level. 2) The running application might run for days or weeks. I want to have a trace file once per day. 3) If the tracing period is over I want to merge all trace fi...

Ensuring code coverage in unit testing?

We have noticed that even though we have a lot of doctests in our Python code, when we trace the testing using the methods described here: traceit we find that there are certain lines of code that are never executed. We currently sift through the traceit logs to identify blocks of code that are never run, and then try to come up with ...

How to ignore generated code from code coverage data

I am using Visual Studio 2010 and would like to exclude the generated service reference code from my code coverage statistics. I found an article pre 2010 that mentions using DebuggerNonUserCode and DebuggerHidden attributes. I have tried this an it works as advertised. DebuggerNonUserCode is set at the class level, but with 50+ classe...