Questions tagged [cobertura]

Cobertura is a free and open-source Java tool based on jcoverage that calculates the percentage of code and branches covered by tests.

Cobertura is a free and open-source Java tool (commonly called a code coverage tool) based on jcoverage that calculates the percentage of code and branches covered by tests.

Cobertura does this by instrumenting the compiled bytecode. It can be run from the command line, via an Ant task, via a Maven plugin, or via the eCobertura Eclipse plugin. Builds can be made to fail if the code coverage reported by Cobertura does not meet a user-set threshold value. XML and HTML reports can be generated as output.

649 questions
0
votes
1 answer

Jboss Fuse and Cobertura

I have my application which runs in Jboss Fuse on Linux. I deploy my artifacts as jar files under the /deploy directory. I was planning to make use of Cobertura to get code coverage report after executing my jmeter tests. I instrumented my jars and…
Rajjy
  • 176
  • 13
0
votes
0 answers

Apps instrumented on JBoss 6.1.0 not writing coverage information to cobertura.ser

We in our team are trying to get cobertura reports generated from selenium tests run out of the production deployment of our JBoss based applications. We use JBoss 6.1.0 for this purpose. For some reason, the server doesn't seem to write into the…
Shankar
  • 13
  • 4
0
votes
1 answer

Exclude accessors from Sonar code coverage

I've been struggling to exclude accessors in SonarQube v4.0. Everywhere I look I find the setting 'Seperate accessors'. If this is set to 'true' which is the default than the accessors should be excluded from code coverage. However it doesn't seem…
wvp
  • 1,134
  • 5
  • 15
  • 28
0
votes
1 answer

cobertura code coverage for jetty server

Hi I am trying to get code coverage for my web application. I Instrumented my compiled classes then I deployed it in jetty server. then i ran my test cases from http client and i was expecting cobertura.ser file to be generated at server but it is…
Rama Krishna
  • 120
  • 8
0
votes
1 answer

How are the covered branches counted in SonarQube?

Example 1 if ( a1 || a2 || ... || an ) { ... } Sonar shows that 0/2*n branches are covered by tests. (E.g.: 0/6 for n=3) Let's take a function: f:{a1,...,an}->{true,false} The number of functions (=all possible combinations) is equal to…
ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
0
votes
1 answer

NoSuchMethodException thrown when trying to invoke methods in cobertura instrumented classes

I have a webapp comprised of a bunch of OSGI bundles. The requirement is to generate the cobertura code coverage report when running automation tests on the deployed artifact. For this I have instrumented the deployable artifact using cobertura as…
Sampath
  • 41
  • 2
0
votes
0 answers

How to avoid mvn cobertura plugin affecting xpath return type in apache camel route

I am using apache camel 2.12.0 (tried also 2.14.0). I have a route where I receive xml from remote server:
vemod
  • 31
  • 3
0
votes
0 answers

Cannot get Cobertura coverage report

I use SonarQube 4.5.2, with Maven in an Eclipse project. Here are fragments from my POM: org.codehaus.mojo cobertura-maven-plugin
gfot
  • 95
  • 2
  • 11
0
votes
1 answer

How to instrument fragment bundles JUNIT tests using Cobertura?

We are trying to measure our code coverage of JUNIT test cases using Cobertura. Our application is a Java stack which was designed by OSGI model. Due to fragment bundle implementation of my test Cobertura is not able to calculate the code coverage…
0
votes
1 answer

Maven - Deploy Cobertura Report to Confluence Wiki

I'm using the plugin called maven-confluence-reporting-plugin in order to deploy my documentation directly on a Confluence Wiki. This is working well and it has been correctly mapped/linked with the default site phase. Basically I followed these…
hublo
  • 1,010
  • 2
  • 12
  • 33
0
votes
1 answer

Getting this error in eclipse editor

I am getting this error in eclispe editor all of a sudden It was working previously. I am using Mac OSx I was not getting that before. I am building the project using ant which is working fine. I am using Eclipse 4.3.2. Is it specific to MAC OS…
user1403505
  • 895
  • 2
  • 19
  • 42
0
votes
1 answer

Why is "src/main/java" included in my package names in Sonar?

We have a Java (7) project that uses Maven (3.2.1). We have a Jenkins (1.554) server, and we use it to run code analysis with SonarQube (4.3). I have configured the default dashboard to show a few treemaps to visualize the test coverage in different…
xmik
  • 128
  • 1
  • 1
  • 8
0
votes
1 answer

ExceptionInInitializerError using Cobertura 2.0.3, Java 7, and Ant

I am trying to upgrade to Java 7 on an Ant project which will use Cobertura 2.0.3. Cobertura target in build.xml:
ABC123
  • 1,037
  • 2
  • 20
  • 44
0
votes
0 answers

Grails cobertura support

Just added Cobertura to project and faced with problem like in this question. How can I add a lib only for test environment to Grails project? Or maybe you know a better solution for Coberture in Grails?
Mr. Cat
  • 3,522
  • 2
  • 17
  • 26
0
votes
2 answers

Unable to install cobetura plugin in eclipse

I'm trying to install Cobertura plugin (http://ecobertura.johoop.de/update/) on Helios version of my eclipse but getting this exception "org.eclipse.equinox.p2.core.ProvisionException", It says unable to read repository at…
user85
  • 1,526
  • 5
  • 26
  • 42