cobertura

double unit test reporting with hudson and maven

自作多情 提交于 2019-12-09 10:29:17
问题 I have a maven2 project in hudson and when the cobertura reporting plugin runs, it causes the unit tests to show that they have run twice. I don't mind them running multiple times, but the trend graph shows twice as many tests as we actually are running. Is there a way to make sure the graph only shows them once? thanks, Jeff 回答1: This is a known bug. Just wait for it to be fixed. 回答2: The workaround I use (works in Hudson 1.391) is to configure cobertura in separate Maven profile and run it

Clearing coverage highlighting in Eclipse

笑着哭i 提交于 2019-12-09 04:03:58
问题 After running coverage reports in Eclipse (using cobertura or an EMMA plugin), my source code files get highlighted in green, red and yellow depending on which lines of code were covered by tests. How can I clear this highlighting after I'm done? 回答1: Click the "Remove all Sessions" button in the toolbar of the "Coverage" view. 回答2: On 4.2 eclipse it seems to be impossible to remove the eCobertura highlights. Sadly eCobertura plugins seems to be not maintained anymore. However if you start

Increasing permgen space for Cobertura ant task running from Gradle

对着背影说爱祢 提交于 2019-12-08 19:03:29
I'm getting the following trying to run Cobertura as part of my Gradle build. :cobertura Instrumenting classes for Cobertura Exception in thread "Test worker" java.lang.OutOfMemoryError: PermGen space java.lang.OutOfMemoryError: PermGen space I've tried bumping up DEFAULT_JVM_OPTS / -XX:MaxPermSize in my gradle wrapper script, to no effect. Is there a more direct (and effective) way to do this? The only thing that worked for me was changing the .bashrc on my Linux box to have export _JAVA_OPTIONS='-XX:MaxPermSize=512m' Proof that this got detected by gradle when I built was shown with this

Why does Cobertura fail to report assert branch path was covered?

霸气de小男生 提交于 2019-12-08 17:41:42
问题 In Cobertura, I can not get it to report that the conditional path of an assert statement was taken. Is this a known limitation? I have a JUnit test that expects and AssertionError to be thrown, and it passes correctly. The problem is that Cobertura reports that the assert branch was not covered. After more investigation, I see that part of the branch coverage is being detected. The line is question is: assert data != null; and Cobertura reports the coverages as: Conditional coverage 75% (3/4

Jenkins Cobertura plugin “Source code is unavailable”

流过昼夜 提交于 2019-12-08 17:21:17
问题 I'm using Jenkins ver. 1.466 with Jenkins Cobertura Plugin ver. 1.5 . I generated coverage report for Django project. All charts looks good, but when I want to see source code I have warning message: Source code is unavailable. Some possible reasons are: This is not the most recent build (to save on disk space, this plugin only keepsthe most recent builds source code). Cobertura found the source code but did not provide enough information to locate the source code. Cobertura could not find

How do I make Jenkins, Sonar and the JaCoCo plugin work together for Eclipse Tycho Plugin Projects (or maybe Cobertura)?

让人想犯罪 __ 提交于 2019-12-08 17:08:40
问题 my setup is: Jenkins 1.448 Sonar 2.13 Jenkins Sonar Plugin 1.72 a MySql database for Sonar I have the following project: Eclipse Plugin Project using Maven multiple modules (parent maven project, source plugin project, test fragment project) a simple JUnit test testing a class of the source plugin project What the process is at the moment: Jenkins checks out the parent project from SVN Jenkins builds the project and its modules using Maven and Tycho Jenkins uses Surefire to execute the tests

Lombok annotations vs code coverage in Cobertura or similar tool

喜夏-厌秋 提交于 2019-12-08 14:58:21
问题 Configure cobertura to ignore certain blocks of code From what I have read from above question, there's no way in Cobertura to exclude given code part from being tested versus having coverage in tests. Is that true? / Is it possible in any simmilar tool? I'm usuing Lombok annotations @Getter , @Setter and so on, which are great, but they result in being 'red' in coverage report, even if I'm testing getter and setter methods. - I would like to do something with that... Is there any way to fix

Excluding plugins from Cobertura reports in Grails

时光总嘲笑我的痴心妄想 提交于 2019-12-08 07:26:42
问题 I'm using SpringSecurity plugin in my project and also Cobertura plugin for code coverage reports. The thing is I'd like the SpringSecurity specific classes (login and logout controllers, persistent login token and so on) to be excluded from my reports, since I assume they work properly. I'd like reports to contain only my project specific classes code coverage. Is there any way I can achieve that? 回答1: coverage { exclusions = ['**/grails-app/conf/**','**/*any.other.package*','**/*any.class*'

Ignore methods in class. cobertura maven plugin

不想你离开。 提交于 2019-12-07 16:39:38
问题 I have maven 3, cobertura maven plugin 2.51 and some classe. I need to know test coverage of my class. But I don't want to test setters/getters. So I wand just to ignore them. <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>2.5.1</version> <configuration> <formats> <format>html</format> <format>xml</format> </formats> <check> <haltOnFailure>false</haltOnFailure> <lineRate>55</lineRate> <branchRate>60</branchRate> <packageLineRate>60<

cobertura-maven-plugin with Java 8

浪尽此生 提交于 2019-12-06 18:45:11
问题 Is it just me or the cobertura-maven-plugin doesn't work with java 8? when it runs I get [INFO] --- cobertura-maven-plugin:2.6:instrument (default) @ provider-impl --- [INFO] Cobertura 2.0.3 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file [cobertura] WARN [main] net.sourceforge.cobertura.instrument.CoberturaInstrumenter - Unable to instrument file /var/lib/jenkins/workspace/BranchBuilder/implementations/provider-impl/target/generated-classes/cobertura/com/foo/impl/internal