All Questions

376
votes
12answers
140582 views

What can I use for good quality Code Coverage for C#/.NET?

I wonder what options there are for .net (or C# specifically) Code Coverage, especially in the Lower Priced segment? I am not looking for recommendations, but for a comparison of products based on fac...
442
votes
30answers
139263 views

What is a reasonable code coverage % for unit tests (and why)?

If you were to mandate a minimum percentage code-coverage for unit tests, perhaps even as a requirement for committing to a repository, what would it be? Please explain how you arrived at your answer...
42
votes
15answers
9676 views

Should one test internal implementation, or only test public behaviour?

Given software where ... The system consists of a few subsystems Each subsystem consists of a few components Each component is implemented using many classes ... I like to write automated tests of...
72
votes
8answers
57202 views

How to configure multi-module Maven + Sonar + JaCoCo to give merged coverage report?

I've searched up and down the internet for this one. There's lots of half-answers out there, to do with Maven properties such as ${sonar.jacoco.reportPath}, or org.jacoco:jacoco-maven-plugin:prepare-a...
55
votes
6answers
36102 views

Testng, Emma, Cobertura, coverage and JDK 7 result in ClassFormatError and VerifyError

I have switched to the newest JDK 7 and I am having problems with running testng unit test on byte code that is fiddled by emma coverage tool. None of my test cases are run correctly and for most of t...
72
votes
15answers
36611 views

How to add test coverage to a private constructor?

This is the code: package com.XXX; public final class Foo { private Foo() { // intentionally empty } public static int bar() { return 1; } } This is the test: package com.XXX; publ...
48
votes
4answers
63546 views

Exclude methods from code coverage with Cobertura

Is there a way to exclude code from inclusion into Cobertura coverage reports? We have some methods that should not be included in the coverage report and therefore not drive down the coverage numbers...
9
votes
3answers
23084 views

SONAR - Measure Code Coverage using Cobertura

I am using sonar to measure code quality. One thing that I do not know is the steps to measure code coverage using Cobertura. I followed the steps from http://cobertura.sourceforge.net/anttaskrefere...
34
votes
4answers
11113 views

Reaching 100% Code Coverage with PHPUnit

I've been in the process of creating a test suite for a project, and while I realize getting 100% coverage isn't the metric one should strive to, there is a strange bit in the code coverage report to ...
32
votes
4answers
18476 views

Android test code coverage with JaCoCo Gradle plugin

I'm new to Gradle and Android testing but I've already converted my Android project to build with Gradle. Now I'm trying to perform test coverage of an Android project with Gradle's JaCoCo plugin. I...

Previous Next