Integration tests now run separately from unit tests (with caveats described in the gradle file)

This commit is contained in:
Clinton Alexander 2016-06-09 14:11:18 +01:00 committed by Andras Slemmer
parent 532416ec5a
commit 99fdacd0dc
4 changed files with 27 additions and 2 deletions

View File

@ -44,10 +44,23 @@ repositories {
jcenter()
}
sourceSets {
integrationTest {
kotlin {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/integration-test/kotlin')
}
}
}
//noinspection GroovyAssignabilityCheck
configurations {
// we don't want isolated.jar in classPath, since we want to test jar being dynamically loaded as an attachment
runtime.exclude module: 'isolated'
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}
// This is required for quasar. I think.
@ -70,6 +83,10 @@ dependencies {
testCompile 'junit:junit:4.12'
testCompile 'org.assertj:assertj-core:3.4.1'
testCompile 'com.pholser:junit-quickcheck-core:0.6'
// Integration test helpers
integrationTestCompile 'junit:junit:4.12'
integrationTestCompile 'org.assertj:assertj-core:3.4.1'
}
// Package up the demo programs.
@ -99,8 +116,7 @@ task getTraderDemo(type: CreateStartScripts) {
// Force windows script classpath to wildcard path to avoid the 'Command Line Is Too Long' issues
// with generated scripts. Include Jolokia .war explicitly as this isn't picked up by wildcard
tasks.withType(CreateStartScripts)
{
tasks.withType(CreateStartScripts) {
doLast {
windowsScript.text = windowsScript
.readLines()
@ -109,6 +125,15 @@ tasks.withType(CreateStartScripts)
}
}
task integrationTest(type: Test) {
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath
}
tasks.withType(Test) {
reports.html.destination = file("${reporting.baseDir}/${name}")
}
quasarScan.dependsOn('classes', 'core:classes', 'contracts:classes', 'node:classes')
applicationDistribution.into("bin") {