jacoco

Android Studio JaCoCo reports 0% coverage

爱⌒轻易说出口 提交于 2020-01-04 05:32:06
问题 I use this build.gradle file: apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "22.0.1" defaultConfig { applicationId "name" minSdkVersion 21 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { debug { testCoverageEnabled = true } release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } testOptions { unitTests.returnDefaultValues = true } } dependencies { compile fileTree(dir:

How to activate GitLab Pages in an existing project?

ε祈祈猫儿з 提交于 2020-01-04 04:32:06
问题 I want to publish my code coverage reports for my Java project that is already on GitLab. I generate code coverage reports with JaCoCo in a folder located in app/target/site/jacoco/ . I saw I had to activate GitLab Pages. But this link on the GitLab documentation say I have to create a new project. My Java project is already in a GitLab Project and I don't know how to do in that case. 回答1: You do not have to create a new project if you already got one The GitLab documentation is a little

Sonar reports different line and branch coverage than Idea, Eclipse, Maven and Jenkins

拜拜、爱过 提交于 2020-01-03 17:16:33
问题 I have all those tools reporting the same coverage with JaCoCo: 69% line coverage and 23% branch coverage. Note: Screenshots had been taken over several days so they have slightly different values, but the variance is < 1% Jenkins: Maven: Eclipse: However Sonar reports different values: Maven project is structured as follows: main (aggregator) java module js (node) module You can see the same coverage reported on main and java modules, and no coverage for the js one. I'm using the latest

How does SonarQube calculate coverage through JaCoCo?

Deadly 提交于 2020-01-03 06:16:28
问题 JaCoCo just outputs jacococ.exec which is the input for Sonar. In that file, there seems to be only the info: - Class name - Total Class Probes - Executed Class Probes But then, SonarQube cannot rely solely on these values as it needs to tell you which are the exact lines unconvered, so Sonar is performing an analysis on itself. So how does it use Jacoco report? And why does it need it? 回答1: So how does it use Jacoco report? And why does it need it? SonarQube itself alone doesn't / can't know

How to specify the specific packages for the 'jacoco-check'?

落爺英雄遲暮 提交于 2020-01-03 02:45:08
问题 My project is built using Maven. I use the 'Jacoco' plugin to perform quality checks. For a project I would like to check the test coverage on line basis. I would like to check the line coverage only for only 3 packages. How can I specify this check? I tried 'including' a number of packages, but that does not work. I also tried to include the root package level and exclude a number of other packages. Also not working. How can I have the package A, B and C checked? See my example below:

JaCoCo - exclude JSP from report

*爱你&永不变心* 提交于 2020-01-02 01:20:24
问题 In the Maven site reports generated by JaCoCo, I get quite bad coverage because all of my compiled JSPs are included (and they are long). I tried the following in reporting : <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <configuration> <exclude>target/classes/jsp/**/*.class</exclude> </configuration> </plugin> Another similar-looking configuration is in the build section of the POM for the prepare-package phase. That doesn’t stop the JSP classes from

SonarQube on Java8-project gives jacoco-Exception

删除回忆录丶 提交于 2020-01-02 00:43:46
问题 I just downloaded the latest version, SonarQube 4.3, then try build a java-8 project with: mvn clean install mvn sonar:sonar That gives me the Exception below. Googling, I got the impression this is an earlier issue that should have been fixed... ? http://sonarqube.15.x6.nabble.com/Sonar-analyze-Java-1-8-project-Failure-td5023663.html http://jira.codehaus.org/browse/SONARJAVA-482 Does SonarQube 4.3 support java-8? Or any clue, what is the problem? ---------------------------------------------

SonarQube on Java8-project gives jacoco-Exception

二次信任 提交于 2020-01-02 00:42:53
问题 I just downloaded the latest version, SonarQube 4.3, then try build a java-8 project with: mvn clean install mvn sonar:sonar That gives me the Exception below. Googling, I got the impression this is an earlier issue that should have been fixed... ? http://sonarqube.15.x6.nabble.com/Sonar-analyze-Java-1-8-project-Failure-td5023663.html http://jira.codehaus.org/browse/SONARJAVA-482 Does SonarQube 4.3 support java-8? Or any clue, what is the problem? ---------------------------------------------

Running code coverage with Cobertura and Jacoco

前提是你 提交于 2020-01-01 06:26:16
问题 I have a bit of a problem getting code coverage reports for both Integration Tests and Unit Tests in Sonar for a Maven Plugin project (which uses invoker plugin for the integration tests). I can't use the default Jacoco coverage tool for the unit tests, as these use Powermock, which results in 0% coverage for classes using that. On the other hand, I can't find a reliable way to get results for the Groovy-based integration tests without using Jacoco. So what I need is for Cobertura to produce

Running code coverage with Cobertura and Jacoco

≡放荡痞女 提交于 2020-01-01 06:26:05
问题 I have a bit of a problem getting code coverage reports for both Integration Tests and Unit Tests in Sonar for a Maven Plugin project (which uses invoker plugin for the integration tests). I can't use the default Jacoco coverage tool for the unit tests, as these use Powermock, which results in 0% coverage for classes using that. On the other hand, I can't find a reliable way to get results for the Groovy-based integration tests without using Jacoco. So what I need is for Cobertura to produce