Skip to content

Instantly share code, notes, and snippets.

@durimkryeziu
Last active January 21, 2019 11:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save durimkryeziu/e987631e1ed304582fbfa75d970d0ee6 to your computer and use it in GitHub Desktop.
Save durimkryeziu/e987631e1ed304582fbfa75d970d0ee6 to your computer and use it in GitHub Desktop.
Gradle Configuration for Integration Tests
// Tested with Gradle 5.0
sourceSets {
integrationTest {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
resources.srcDir file('src/integrationtest/resources')
}
}
configurations {
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntimeOnly.extendsFrom testRuntimeOnly
}
task integrationTest(type: Test) {
description = 'Runs the integration tests.'
group = 'verification'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
outputs.upToDateWhen { false }
shouldRunAfter test
}
check.dependsOn -= integrationTest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment