-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
74 lines (61 loc) · 1.81 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
plugins {
id 'groovy'
id "com.github.erdi.webdriver-binaries" version "2.4"
}
ext {
// The drivers we want to use
drivers = ["firefox", "chrome", "chromeHeadless", "chromeRemote", "firefoxRemote"]
ext {
gebVersion = '4.0'
seleniumVersion = '3.141.59'
chromeDriverVersion = '87.0.4280.20'
// chromeDriverVersion = '91.0.4472.19'
geckoDriverVersion = '0.28.0'
}
}
repositories {
mavenCentral()
}
dependencies {
// if using Spock, need to depend on geb-spock
testImplementation "org.gebish:geb-spock:$gebVersion"
testImplementation("org.spockframework:spock-core:1.3-groovy-2.5") {
exclude group: "org.codehaus.groovy"
}
// drivers
testImplementation "org.seleniumhq.selenium:selenium-remote-driver:$seleniumVersion"
testImplementation "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion"
testImplementation "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion"
}
webdriverBinaries {
chromedriver {
version = chromeDriverVersion
fallbackTo32Bit = true
}
geckodriver geckoDriverVersion
}
drivers.each { driver ->
task "${driver}Test"(type: Test) {
group JavaBasePlugin.VERIFICATION_GROUP
outputs.upToDateWhen { false } // Always run tests
systemProperty "geb.build.reportsDir", reporting.file("geb/$name")
systemProperty "geb.env", driver
testLogging {
events "passed", "skipped", "failed"
}
}
}
test {
dependsOn drivers.collect { tasks["${it}Test"] }
enabled = false
}
tasks.withType(Test) {
maxHeapSize = "1g"
jvmArgs '-XX:MaxMetaspaceSize=128m'
testLogging {
exceptionFormat = 'full'
}
}
tasks.withType(GroovyCompile) {
groovyOptions.forkOptions.memoryMaximumSize = '256m'
}