0

I have seen similar questions and tried enough yet can't get this to work. I have testset in my build.gradle file and trying to configure Jacoco test report to include my separate integrationTest

build.gradle

    jacocoTestCoverageVerification {
    violationRules {
        rule {
            limit {
                counter = 'LINE'
                value = 'COVEREDRATIO'
                minimum = 0.5
            }
        }
    }
}

jacocoTestReport {
    // Gather execution data from all subprojects
    executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")

    sourceSets sourceSets.main
    reports {
        html.enabled true
    }
}

test.finalizedBy jacocoTestReport // report is always generated after tests run
jacocoTestReport.dependsOn test, integrationTest // tests are required to run before generating the report
check.dependsOn integrationTest, jacocoTestCoverageVerification
Knight Rider
  • 972
  • 2
  • 10
  • 22

1 Answers1

0
id 'com.coditory.integration-test' version '1.3.0'

https://github.com/coditory/gradle-integration-test-plugin

I ended up using the plugin above and everything works smoothly. I get combined test results and generation of the execution data for both unit and integration tests.

Knight Rider
  • 972
  • 2
  • 10
  • 22