-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
45 lines (36 loc) · 1018 Bytes
/
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
apply plugin:"groovy"
repositories{
jcenter()
}
ext{
drivers = ["firefox","chrome"]
groovyVersion = "2.4.4"
spockGroovyVersion = "2.4"
gebVersion = "0.12.1"
seleniumVersion = "2.47.1"
}
dependencies{
testCompile "org.codehaus.groovy:groovy-all:${groovyVersion}"
testCompile "org.gebish:geb-spock:${gebVersion}"
testCompile "org.spockframework:spock-core:1.0-groovy-${spockGroovyVersion}"
drivers.each{ driver ->
testCompile "org.seleniumhq.selenium:selenium-${driver}-driver:${seleniumVersion}"
}
}
drivers.each{ driver ->
task "${driver}Test"(type:Test){
reports{
html.destination = reporting.file("$name/tests")
}
outputs.upToDateWhen{ false }
systemProperty "geb.build.reportsDir",reporting.file("$name/geb")
systemProperty "geb.env", driver
}
}
chromeTest{
systemProperty "webdriver.chrome.driver","${System.properties["user.home"]}/.grails/chromedriver"
}
test{
dependsOn drivers.collect{ driver -> tasks["${driver}Test"] }
enabled = false
}