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

Cobertura not recognizing tests

I have added the dependency but for some reason Cobertura decided against loading any of my test classes from src/test/. It just loads the classes from src/java/ and hence doesn't show the code coverage or anything. I checked the packages (all the…
noMAD
  • 7,744
  • 19
  • 56
  • 94
0
votes
1 answer

diagnose why my Cobertura output from Ant is in debug mode

I've set up an Ant script to run unit tests with Cobertura. For some reason I'm getting the log4j DEBUG output from Cobertura. I've been staring at this for hours using all the diagnostic fu I can come up with, and I don't see why this is…
David M. Karr
  • 14,317
  • 20
  • 94
  • 199
0
votes
1 answer

junit sometimes fails with timeout error, even when well below the limit

I've set up an Ant build script to run unit tests with Cobertura. I have a "timeout" attribute of "10000" in the "junit" task. I've tested running my unit tests many times. For some reason, when I first run it after having not run it for a while…
David M. Karr
  • 14,317
  • 20
  • 94
  • 199
0
votes
2 answers

Why code coverage is different when measured by eCobertura and EclEmma?

When using eCobertura and EclEmma resp. I found the code coverage come out as different in each case for the same project. Interested to know why? Emma stat eCobertura stat
R11G
  • 1,941
  • 8
  • 26
  • 37
0
votes
1 answer

Cobertura not recognizing JUnit4 tests: No tests found

I am currently upgrading from JUnit3 to JUnit4 and I have changed my main test suite to use the @SuiteClasses annotation. However now when I run cobetura it can't find any tests. I have checked to ensure I am seeing the right jar in the Cobertura…
Jackie
  • 21,969
  • 32
  • 147
  • 289
0
votes
1 answer

Sonar analysis hangs on Execute decorators

I am using Sonar with Ant, importing Cobertura and unit test results and running code quality analysis with setting "Sonar + FindBugs". I have previously been able to analyse my (large) project with Sonar. I don't know, maybe I have done some…
user1340582
  • 19,151
  • 35
  • 115
  • 171
0
votes
1 answer

How to re-use multiple Cobertura xml reports in Sonar

I am using Sonar on Linux with project in Java using Ant. I have a multi-module development project. I have been able to import multiple source folders, test folders, and binary folders. Unit test reports are also imported fine since all reports are…
user1340582
  • 19,151
  • 35
  • 115
  • 171
0
votes
0 answers

How can load only Cobertura results into Sonar?

Possible Duplicate: SONAR - Measure Code Coverage using Cobertura I have configured our ant build to use the sonar plug-in and it runs the static analysis tools and loads the results correctly into Sonar. Our test group is running system level…
user1660532
  • 21
  • 1
  • 5
0
votes
2 answers

Ivy cannot resolve maven-cobertura-plugin

I am using Ivy for dependency managment. I have problems with maven-findbgs-plugin:plugin:1.3.1 maven-cobertura-plugin:plugin:1.3 There were several topics on SO about this:e.g. Maven Dependencies can't be resolved The answer is to…
0
votes
1 answer

Cobertura Coverage Report Image

Does anybody know where Cobertura sticks it's coverage report image? The url to my image is: http://ContinualTests/746/cobertura/graph When I dig down on my box that is running tomcat/hudson I find tomcat6/.hudson/jobs/XX/builds/746 but I don't…
Erik W
  • 69
  • 7
0
votes
0 answers

Bean loses its 'supplies Class' when deploying with cobertura / instrumented code

Under normal startup of my application checking the server log shows that when it is time for a particular bean to be deployed, it shows something along the lines of: installing bean: ... with dependencies: and demands: ... and supplies: …
Andrew Stubbs
  • 4,322
  • 3
  • 29
  • 48
0
votes
2 answers

Sub-module cobertura jenkins reports

We have project with following layout parent app core instrumentation There is cobertura plugin in core module. I'm able to generate reports from command line no problem at all (XML and HTML) I'm even able to see them in workspace on Jenkins.…
peter_budo
  • 1,748
  • 4
  • 26
  • 48
0
votes
1 answer

Cobertura didn't find any instrumented classes

I am new to Cobertura and I am trying to instrument classes from compliled jar file. After unpacking I run the following command: D:\cobertura-1.9.4.1\7.6.300.01>D:\cobertura-1.9.4.1\cobertura-instrument.bat --basedir…
Veres
  • 43
  • 1
  • 4
0
votes
1 answer

Why cobertura reports code coverage as zero for all but one module in multi-module maven project?

I am trying to generate code coverage report for our multi-module maven project using cobertura. After I run mvn clean and then run mvn package. Then, in one of the modules from where we run JUnit tests, the coverage report generated for that module…
user1492680
  • 1
  • 1
  • 2
0
votes
1 answer

maven cobertura generated-classes

I'm using the maven cobertura plugin to generate coverage reports, but for some reason, the instrument goal gets stuck in an infinite loop. In my classes directory (named bin), an infinite loop occurs and creates directories named…
Jeff Storey
  • 56,312
  • 72
  • 233
  • 406
1 2 3
43
44