-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
67 lines (50 loc) · 1.91 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
55
56
57
58
59
60
61
62
63
64
65
66
apply plugin: "groovy"
apply plugin: "idea"
apply plugin: "eclipse"
repositories {
mavenCentral()
}
// The drivers we want to use
ext.drivers = ["chrome", "firefox"]
dependencies {
// def gebVersion = "0.9.0-RC-3"
// def seleniumVersion = "2.30.0"
def gebVersion = "0.9.2"
def seleniumVersion = "2.39.0"
// If using Spock, need to depend on geb-spock
testCompile "org.gebish:geb-spock:$gebVersion"
testCompile "org.spockframework:spock-core:0.7-groovy-2.0"
// If using JUnit, need to depend on geb-junit (3 or 4)
testCompile "org.gebish:geb-junit4:$gebVersion"
// Drivers
drivers.each { driver ->
testCompile "org.seleniumhq.selenium:selenium-$driver-driver:$seleniumVersion"
}
}
drivers.each { driver ->
task "${driver}Test"(type: Test) {
println "Creating test-task for driver: ${driver}"
// Gradle version 1.5
// testReportDir = reporting.file("$name/tests")
// testResultsDir = file("$buildDir/test-results/$name")
// Gradle version 1.10
reports.html.destination = reporting.file("$name/tests")
reports.junitXml.destination = file("$buildDir/test-results/$name")
//systemProperty "geb.build.reportsDir", reporting.file("$name/geb")
systemProperty "geb.env", driver
//System.properties["geb.env"] = driver
//systemProperty "webdriver.chrome.driver", "/home/jaw/workspaces/basecamp/pure-gradle/drivers/chrome/chromedriver"
//System.setProperty("webdriver.chrome.driver", "/home/jaw/workspaces/basecamp/pure-gradle/drivers/chrome/chromedriver")
// systemProperty "webdriver.ie.driver", "drivers/ie/IEDriverServer.exe"
// If you wanted to set the baseUrl in your build…
// systemProperty "geb.build.baseUrl", "http://myapp.com"
}
}
test {
dependsOn drivers.collect { tasks["${it}Test"] }
enabled = false
}
task wrapper(type: Wrapper) {
// gradleVersion = '1.5'
gradleVersion = '1.10'
}