Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Jacoco] Failed tests in one module stops build and report aggregation #535

Open
Wrdle opened this issue Jan 30, 2024 · 1 comment
Open

Comments

@Wrdle
Copy link

Wrdle commented Jan 30, 2024

Hi there,

At the moment I am facing an issue where upon running the aggregateJacocoReport from the main project if tests in module fail it causes the build to fail and following tests in other modules to not run and the report not generated.

Project structure looks like:

  • Project
    • build.gradle.kts
    • settings.gradle.kts
    • project1
      • build.gradle.kts
    • project2
      • build.gradle.kts
    • project3
      • build.gradle.kts

In terms of kordamp gradle plugins I am only using org.kordamp.gradle.jacoco version 0.54.0.

For tests each project applies the official jacoco plugin and configures the test task:

tasks.test {
    useJUnitPlatform()
}

If I configure ignoreFailures=true the tests continue through all modules to run and generate a aggregated report, however, without this property the tests in other modules are never run. Ideally I need the "build" to fail but all tests run and generate the aggregated report.

It looks like this may have been addressed here but not sure if its the same issue.

I understand this is more of a help question than an issue so I really appreciate your time and effort.

@aalmiray
Copy link
Collaborator

aalmiray commented Feb 6, 2024

If this is your first time using the Kordamp Gradle Plugin suite to aggregate JaCoCo reports then I'd suggest you move on and use JaCoCo directly. I believe Gradle 7 or 8 added the behavior you seek. This plugin suite was created at a time where Gradle lacked lots of desirable behavior, such JaCoCo report aggregation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants