forked from depromeet12th/three-days-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
integration-test.gradle
50 lines (43 loc) · 1.5 KB
/
integration-test.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
apply plugin: 'com.epages.restdocs-api-spec'
sourceSets {
integrationTest {
groovy {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/integration-test/groovy')
}
resources.srcDir file('src/integration-test/resources')
}
}
ext {
snippetsDir = file('app/build/generated-snippets')
snippetsDir = file('app/build/api-docs')
}
dependencies {
testImplementation('org.springframework.restdocs:spring-restdocs-mockmvc')
implementation "org.codehaus.groovy.modules.http-builder:http-builder:0.7.1"
testImplementation 'org.springframework.security:spring-security-test'
testImplementation('com.epages:restdocs-api-spec-mockmvc:0.16.2')
}
configurations {
integrationTestImplementation.extendsFrom testImplementation
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}
task integrationTest(type: Test) {
afterTest { desc, result ->
testLogging {
showExceptions = true
showStackTraces = true
showCauses = true
exceptionFormat = 'short'
}
logger.quiet "Executing integration test ${desc.name} [${desc.className}] with result: ${result.resultType}"
}
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
outputs.upToDateWhen { false }
}
integrationTest {
useJUnitPlatform()
}