Comments (6)
Tests are executed and the expected report is generated after the removal of junit-platform-launcher
and junit-platform-runner
from test
dependencies - steinarb/osgi-service#2
from jacoco.
Hi @steinarb, please understand that we cannot provide support for other products like Sonar here.
Can you please create JaCoCo html reports and check the coverage in these reports? Thx
from jacoco.
This project lost code coverage when moving from jacoco 0.8.7 to 0.8..10 https://github.com/steinarb/osgi-service
This doesn't seem to be related to the update of JaCoCo version, because
after checkout of your project at commit bfc0f8944250ae3a61dd41a6f8c98e4c2abe108f
and the following change (i.e. downgrade of parent pom version and update of JaCoCo version to 0.8.10
)
@@ -17,7 +17,7 @@
<parent>
<groupId>no.priv.bang.pom</groupId>
<artifactId>bang-pom</artifactId>
- <version>1.1.33</version>
+ <version>1.1.30</version>
</parent>
<groupId>no.priv.bang.osgiservice</groupId>
<artifactId>osgiservice-parent</artifactId>
@@ -41,6 +41,15 @@
</properties>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.8.10</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
execution of
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent verify
produces the following JaCoCo HTML report
Whereas the same command with the following modification (i.e. without downgrade of parent pom version and with JaCoCo version 0.8.7)
@@ -41,6 +41,15 @@
</properties>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.8.7</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
produces the following report
Therefore look at what else (besides JaCoCo version) changed in the parent pom.
from jacoco.
The culprit is the following change - steinarb/bang-bompom@b0bf04d
i.e. the same command after checkout of your project at commit bfc0f8944250ae3a61dd41a6f8c98e4c2abe108f
and the following change
@@ -41,6 +41,18 @@
</properties>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.22.2</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
produces expected report.
from jacoco.
maven-surefire-plugin
version 3.0.0-M4
produces expected report, whereas 3.0.0-M5
does not
from jacoco.
Before steinarb/osgi-service@879553e
(i.e. before maven-surefire-plugin
version update)
you had
[INFO] --- surefire:2.22.2:test (default-test) @ osgiservice.users ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running no.priv.bang.osgiservice.users.UserRolesTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.023 s - in no.priv.bang.osgiservice.users.UserRolesTest
[INFO] Running no.priv.bang.osgiservice.users.RoleTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in no.priv.bang.osgiservice.users.RoleTest
[INFO] Running no.priv.bang.osgiservice.users.UserManagementServiceTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.716 s - in no.priv.bang.osgiservice.users.UserManagementServiceTest
[INFO] Running no.priv.bang.osgiservice.users.UsersExceptionTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 s - in no.priv.bang.osgiservice.users.UsersExceptionTest
[INFO] Running no.priv.bang.osgiservice.users.UserTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in no.priv.bang.osgiservice.users.UserTest
[INFO] Running no.priv.bang.osgiservice.users.PermissionTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 s - in no.priv.bang.osgiservice.users.PermissionTest
[INFO] Running no.priv.bang.osgiservice.users.UsersPasswordsNotIdenticalExceptionTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 s - in no.priv.bang.osgiservice.users.UsersPasswordsNotIdenticalExceptionTest
[INFO] Running no.priv.bang.osgiservice.users.UserAndPasswordsTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in no.priv.bang.osgiservice.users.UserAndPasswordsTest
[INFO] Running no.priv.bang.osgiservice.users.RolePermissionsTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in no.priv.bang.osgiservice.users.RolePermissionsTest
[INFO] Running no.priv.bang.osgiservice.users.UsersPasswordEmptyExceptionTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in no.priv.bang.osgiservice.users.UsersPasswordEmptyExceptionTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 20, Failures: 0, Errors: 0, Skipped: 0
whereas after
[INFO] --- surefire:3.1.2:test (default-test) @ osgiservice.users ---
[INFO] Using auto detected provider org.apache.maven.surefire.junit4.JUnit4Provider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
no tests were executed, so no coverage as expected.
And why maven-surefire-plugin
after upgrade does not execute your tests is clearly not a question to JaCoCo.
from jacoco.
Related Issues (20)
- make org.jacoco:jacoco-maven-plugin compatible to maven 4.x HOT 1
- gradle 7.2
- org.jacoco.core.test.validation.scala.targets不存在 HOT 1
- PLEASE DO NOT USE GITHUB FOR QUESTIONS - CHECK FAQ OR USE FORUM
- ssssa
- Since Jacoco 0.8.9, "--add-opens java.base/java.lang=ALL-UNNAMED" has no effect. HOT 2
- jacoco fails to instrument code in Android project with Gradle 7.2 version HOT 1
- CLI wrongly interprets non-existing options
- ExcludeFromCodeCoverage annotation (better name than Generated) HOT 1
- Jacoco Problem in AGP 8.0 HOT 1
- Allow exclusions per rule or per limit HOT 1
- Plugin Maven 4 Compatibility HOT 1
- Jacoco agent not reading classes (0 coverage, 0 entries on sessions page) with tomcat .. but generates .exec file on tomcat bootup HOT 2
- There is a conflict between JaCoCo and Lettuce. HOT 2
- A different version of class was executed at runtime HOT 1
- Not able to use maven jacoco offline mode to calculate UT coverage with mockito `@Spy` annotation HOT 2
- Need Actaul Branch coverage report as output HOT 4
- Why does Jacoco report for my Kotlin data class getter has a postfix?
- Why does Jacoco report for my Kotlin data class getter has a postfix? The property name is radius, but in the report the getter is shown as getRadius-ZnsFY2o().
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jacoco.