-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
42 lines (36 loc) · 1.29 KB
/
build.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
apply plugin: "java"
// compile for FooSimulation.scala
apply plugin: "scala"
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
[compileJava, compileTestJava]*.options*.encoding = "UTF-8"
repositories {
mavenCentral()
}
dependencies {
testCompile "io.gatling.highcharts:gatling-charts-highcharts:2.1.6"
}
task loadTest(type: JavaExec) {
dependsOn testClasses
description = "load test with Gatling"
group = "Load Test"
classpath = sourceSets.test.runtimeClasspath
jvmArgs = [
// workaround for https://github.com/gatling/gatling/issues/2689
"-Dgatling.core.directory.binaries=${sourceSets.test.output.classesDir.toString()}",
"-Dlogback.configurationFile=${logbackGatlingConfig()}",
]
main = "io.gatling.app.Gatling"
args = [
"--simulation", "gatring.simulations.FooSimulation",
"--results-folder", "${buildDir}/gatling-results",
"--binaries-folder", sourceSets.test.output.classesDir.toString(), // ignored because of above bug
"--bodies-folder", sourceSets.test.resources.srcDirs.toList().first().toString() + "/gatling/bodies",
]
}
def logbackGatlingConfig() {
return sourceSets.test.resources.find { it.name == 'logback-gatling.xml' };
}
task wrapper(type: Wrapper) {
gradleVersion = "2.4"
}