forked from browserstack/geb-browserstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
85 lines (72 loc) · 1.99 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
apply plugin: "idea"
buildscript { //2
repositories {
jcenter()
}
dependencies {
classpath 'org.gebish:geb-gradle:0.10.0'
}
}
allprojects {
apply plugin: "groovy"
}
dependencies {
def gebVersion = "0.10.0" //Uses Binaries and not JAR
def seleniumVersion = "2.42.0"
// If using Spock, need to depend on geb-spock
testCompile "org.gebish:geb-spock:$gebVersion"
compile "org.spockframework:spock-core:0.7-groovy-2.0"
compile "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion"
compile "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion"
}
repositories {
jcenter()
}
//don't disable test task on the root, you'll use it to run the tests locally
test {
systemProperty "geb.build.reportsDir", reporting.file("$project.buildDir/test-results/$name/geb")
systemProperty "geb.env", 'firefox' //select an env/browser for local testing
}
subprojects { project ->
apply plugin: "geb-browserstack"
browserStack {
application "https://www.google.com"
task {
testClassesDir = rootProject.test.testClassesDir
testSrcDirs = rootProject.test.testSrcDirs
classpath = rootProject.test.classpath
systemProperty "geb.build.reportsDir", reporting.file("$project.buildDir/test-results/$name/geb")
}
account {
username = "<username>"
accessKey = "<automate-key>"
}
//tunnelJar = new File(project.buildDir, "tunnel.jar")
}
}
project('firefox') {
browserStack {
browsers {
firefox_windows
}
account {
localId = 'ff'
}
task {
systemProperty 'browserstack.localIdentifier', 'ff'
}
}
}
project('chrome') {
browserStack {
browsers {
chrome_mac
}
account {
localId = 'chr'
}
task {
systemProperty 'browserstack.localIdentifier', 'chr'
}
}
}