forked from kateyurasova/example-groovy-spock-logback
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
55 lines (43 loc) · 1.37 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
43
44
45
46
47
48
49
50
51
52
53
54
ext {
// The drivers we want to use
drivers = ["chrome", "firefox", "ie"]
ext {
groovyVersion = '2.4'
gebVersion = '1.0'
seleniumVersion = '3.0.1'
}
}
apply plugin: "groovy"
//apply from: "gradle/idea.gradle"
//apply from: "gradle/osSpecificDownloads.gradle"
repositories {
mavenCentral ()
}
dependencies {
testCompile "org.seleniumhq.selenium:selenium-support:3.0.1"
testCompile "org.gebish:geb-spock:$gebVersion"
testCompile ("org.spockframework:spock-core:1.0-groovy-2.4") {
exclude group: "org.codehaus.groovy"
}
testCompile "org.codehaus.groovy:groovy-all:$groovyVersion"
testCompile "org.gebish:geb-junit4:$gebVersion"
testCompile "junit:junit:4.10"
testCompile "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion"
testCompile "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion"
testCompile "org.seleniumhq.selenium:selenium-ie-driver:$seleniumVersion"
}
drivers.each { driver ->
task "${driver}Test" (type: Test) {
reports {
html.destination = reporting.file ("$name/tests")
junitXml.destination = file ("$buildDir/test-results/$name")
}
outputs.upToDateWhen { false } // Always run tests
systemProperty "geb.build.reportsDir", reporting.file ("$name/geb")
systemProperty "geb.env", driver
}
}
test {
dependsOn drivers.collect { tasks["${it}Test"] }
enabled = false
}