-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatling.gradle
47 lines (36 loc) · 1.43 KB
/
gatling.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
apply plugin: 'scala'
sourceSets {
test {
scala {
srcDirs = ['src/test/gatling/simulations']
output.classesDir = 'target/test-classes'
}
}
}
task manifestJar(dependsOn:'compileTestScala',type: Jar) {
dependsOn configurations.testCompile
archiveName 'gatlingBooter.jar'
doFirst {
manifest {
// uri is just needed for Windows-compatibility
attributes 'Class-Path': configurations.testCompile.files.collect{ project.uri(it) }.join(' ')
}
}
}
task gatlingRun(dependsOn:'manifestJar', type: JavaExec) {
group = "gatling"
standardInput = System.in
final def sourceSet = sourceSets.test
File configFile = file('src/test/gatling/conf/gatling.conf')
def String gatlingDataFolder = "$project.rootDir.absolutePath/src/test/gatling/data"
def String gatlingReportsFolder = "$project.buildDir.absolutePath/reports/gatling"
def String gatlingBodiesFolder = "$project.rootDir.absolutePath/src/test/gatling/bodies"
def String gatlingSimulationsFolder = "$project.rootDir.absolutePath/src/test/gatling/simulations"
classpath sourceSet.output + files(manifestJar.archivePath) + files("src/test/gatling/conf")
main = "io.gatling.app.Gatling"
environment GATLING_HOME:''
args '-df', gatlingDataFolder
args '-rf', gatlingReportsFolder
args '-bdf', gatlingBodiesFolder
args "-sf", gatlingSimulationsFolder
}