-
Notifications
You must be signed in to change notification settings - Fork 5
/
int_test.gradle
53 lines (45 loc) · 1.67 KB
/
int_test.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
sourceSets {
intTest
}
configurations {
intTestCompile
intTestCompile.extendsFrom(testCompile)
}
['firefox', 'chrome'].each { driver ->
task "intTest${driver.capitalize()}"(type: Test) { driverTest ->
testClassesDirs = sourceSets.intTest.output.classesDirs
classpath = sourceSets.intTest.runtimeClasspath
reports {
html.destination = reporting.file("$name/html")
}
dependencies {
intTestCompile 'junit:junit:[4.12,)'
intTestCompile 'org.opencadc:cadc-web-test:[2.1.2,)'
intTestCompile 'org.seleniumhq.selenium:selenium-java:[3.18,)'
}
systemProperty "driver", "${driver}"
if (project.hasProperty('intTest_selenium_server_url')) {
systemProperty 'selenium.server.url', project.intTest_selenium_server_url
} else {
systemProperty 'selenium.server.url', 'http://cadcint2.cadc.dao.nrc.ca:3444'
}
if (project.hasProperty('intTest_web_app_url')) {
systemProperty 'web.app.url', project.intTest_web_app_url
} else {
System.out.println("Please set the intTest_web_app_url property (-PintTest_web_app_url=https://myhost.com...).")
}
if (project.hasProperty('intTest_user_name')) {
systemProperty 'user.name', project.intTest_user_name
}
if (project.hasProperty('intTest_user_password')) {
systemProperty 'user.password', project.intTest_user_password
}
}
}
idea {
module {
//and some extra test source dirs
testSourceDirs += file('src/intTest/java')
scopes.TEST.plus += [configurations.intTestCompile]
}
}