-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
85 lines (71 loc) · 2.07 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
import java.text.SimpleDateFormat
buildscript {
ext['seleniumVersion']='3.141.59'
ext['gebVersion']='3.0.1'
dependencies {
classpath "org.seleniumhq.selenium:selenium-remote-driver:${seleniumVersion}"
}
}
plugins {
id 'groovy'
id 'java'
id "idea"
id "com.energizedwork.idea-base" version "1.4"
id "org.sonarqube" version "3.0"
}
group 'provider'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
jcenter()
mavenCentral()
}
ext {
drivers = ["chrome", "chromeHeadless"]
}
dependencies {
testCompile 'org.codehaus.groovy:groovy-all:3.0.6'
testCompile 'org.spockframework:spock-core:1.3-groovy-2.5'
testCompile "org.gebish:geb-spock:$gebVersion"
testCompile 'io.github.bonigarcia:webdrivermanager:4.2.2'
testCompile "org.seleniumhq.selenium:selenium-remote-driver:$seleniumVersion"
testCompile "org.seleniumhq.selenium:selenium-server:$seleniumVersion"
testCompile 'com.aoe:geb-spock-reports:0.2.6'
testCompile ("com.athaydes:spock-reports:1.8.0") { transitive = false }
testCompile 'org.slf4j:slf4j-api:1.7.30'
testCompile 'org.slf4j:slf4j-simple:1.7.30'
testCompile "org.apache.commons:commons-csv:1.8"
testCompile "org.gebish:geb-junit4:$gebVersion"
}
drivers.each { driver ->
task "${driver}Test"(type: Test) {
group JavaBasePlugin.VERIFICATION_GROUP
outputs.upToDateWhen { false }
systemProperty "geb.build.reportsDir", reporting.file("geb/$name")
systemProperty "geb.env", driver
systemProperties System.properties
}
}
test {
dependsOn drivers.collect { tasks["${it}Test"] }
enabled = false
}
def startTime
task printTimes {
doLast {
println "Test start time: " + startTime
println "Test end time: " + getDate()
}
}
tasks.withType(Test){
maxHeapSize = "1g"
jvmArgs '-XX:MaxMetaspaceSize=128m'
testLogging {
exceptionFormat = 'full'
}
}
def getDate() {
Date dNow = new Date()
SimpleDateFormat ft = new SimpleDateFormat ("MM.dd.yyyy hh:mma")
return ft.format(dNow)
}