jacoco

Jacoco Maven multi module project coverage

Deadly 提交于 2020-07-17 09:49:19
问题 Seems like there are couple of questions, which are quite old and things changed from Java 8 support of Jacoco. My Project contains following structure pom.xml | | -----sub module A pom.xml | | -----sub module B pom.xml | | -----sub module C pom.xml I have configured the main pom like this Main POM.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven

JaCoCo not generating jacoco.exec until after skipping JaCoCo execution

不羁岁月 提交于 2020-07-06 06:23:40
问题 I'm having trouble generating AHP reports via JaCoCo in one of my modules. When the build starts, I see JaCoCo correctly setting argLine with: [INFO] jacoco.agent.argLine set to -javaagent:<...>/.m2/repository/org/jacoco/org.jacoco.agent/0.7.2.201409121644/org.jacoco.agent-0.7.2.201409121644-runtime.jar=destfile=<...>/target/jacoco.exec However, the .exec hasn't been created yet by the time maven tries to run JaCoCo: [INFO] Skipping JaCoCo execution due to missing execution data file:<...>

How does assert groupType != null contain 4 branches

吃可爱长大的小学妹 提交于 2020-06-28 03:16:09
问题 I need to test the following code. public List<PatientGroup> findGroups(final String groupType) throws HwBaseAppException { assert groupType != null;//4 branches here CriteriaBuilder criteriaBuilder=persistence.getCriteriaBuilder(); CriteriaQuery<PatientGroup> query = criteriaBuilder.createQuery(PatientGroup.class); Root<PatientGroup> patientGroupRoot = query.from(PatientGroup.class); Predicate condition=criteriaBuilder.equal(patientGroupRoot.get(PatientGroup_.active), Boolean.TRUE); Join

Skipping JaCoCo execution due to missing execution data error

↘锁芯ラ 提交于 2020-06-11 17:02:29
问题 I am getting Skipping JaCoCo execution due to missing execution data file:/scratch/jenkins/workspace/sonar-test/target/jacoco.exec error My pom profile is: <profile> <id>test-coverage</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>${maven.surefire.plugin.version}</version> <configuration combine.self="override"> <redirectTestOutputToFile>true</redirectTestOutputToFile> <testFailureIgnore>true<

Gradle 6.0 deprecation warning for JacocoReport configuration

会有一股神秘感。 提交于 2020-06-10 07:28:12
问题 The following Gradle task, which configures JacocoReportBase: task jacocoRootReport(type: JacocoReport) { ... sourceDirectories = files(subprojects.sourceSets.main.allSource.srcDirs) additionalSourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs) classDirectories = files(subprojects.sourceSets.main.output) executionData = files(subprojects.jacocoTestReport.executionData) ... } produces these warnings, when building with ./gradlew assembleDebug --warning-mode all : The

Code Coverage Kotlin and Java together using Maven - Jacoco

二次信任 提交于 2020-05-27 03:14:29
问题 I am using Maven plugin to generate the code-coverage with Maven Plugin as below: <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>${jacoco.version}</version> <executions> <execution> <id>pre-unit-test</id> <goals> <goal>prepare-agent</goal> </goals> </execution> <execution> <id>post-unit-test</id> <phase>test</phase> <goals> <goal>report</goal> </goals> </execution> </executions> </plugin> But this does not include any code coverage of the kotlin

Jacoco doesn't produce coverage reports

守給你的承諾、 提交于 2020-05-16 05:04:10
问题 I 'm using maven-sure fire plugin to execute tests and Jacoco plugin to generate the coverage reports. Jacoco does't provide coverage reports and instead fails with the debug log as shown here under. [INFO] --- jacoco-maven-plugin:0.8.0:report (jacoco-site) @ util --- [INFO] Skipping JaCoCo execution due to missing execution data file. Here is how the maven sure-fire plugin looks. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.5.2