-
Notifications
You must be signed in to change notification settings - Fork 192
/
build.gradle
71 lines (57 loc) · 1.68 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
plugins {
id "idea"
id "groovy"
id "com.github.erdi.webdriver-binaries" version "2.7"
id "com.github.erdi.idea-base" version "2.2"
}
ext {
// The drivers we want to use
drivers = ["firefox", "chrome", "chromeHeadless"]
gebVersion = '7.0'
seleniumVersion = '4.2.2'
chromeDriverVersion = '79.0.3945.36'
geckoDriverVersion = '0.31.0'
}
repositories {
mavenCentral()
}
dependencies {
// If using Spock, need to depend on geb-spock
testImplementation "org.gebish:geb-spock:$gebVersion"
// If using JUnit 5, need to depend on geb-junit5
testImplementation "org.gebish:geb-junit5:$gebVersion"
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
// Drivers
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
useJUnitPlatform()
systemProperty "geb.build.reportsDir", reporting.file("geb/$name")
systemProperty "geb.env", driver
}
}
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'
}