Created
February 20, 2018 18:20
-
-
Save elderfo/08bff7eb0f65743abbf7fa521a567a6a to your computer and use it in GitHub Desktop.
Integration Test Source Set for Gradle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'java' | |
configurations { | |
integrationTestCompile.extendsFrom testCompile | |
integrationTestRuntime.extendsFrom testRuntime | |
} | |
sourceSets { | |
integrationTest { | |
java.srcDir file('src/integration-test/java') | |
resources.srcDir file('src/integration-test/resources') | |
compileClasspath += sourceSets.main.output + sourceSets.test.output + configurations.testRuntime | |
runtimeClasspath += sourceSets.main.output + sourceSets.test.output + configurations.testRuntime | |
} | |
} | |
task integrationTest(type: Test) { | |
group 'Verification' | |
description 'Runs the integration tests.' | |
testClassesDirs = sourceSets.integrationTest.output.classesDirs | |
classpath = sourceSets.integrationTest.runtimeClasspath | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
There are possible to add all described staff by single line with this plugin.
https://github.com/Softeq/itest-gradle-plugin
https://softeq.github.io/itest-gradle-plugin/
- Ilya