-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
89 lines (71 loc) · 2.35 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
86
87
88
89
group 'AutomationTraining'
version '1.0-SNAPSHOT'
apply plugin: 'java'
sourceCompatibility = 1.8
ext.selenium = "2.49.0"
ext.assertj = "3.9.0"
ext.jbehave = "4.0.5"
ext.jbehaveWebSelenium = "3.5.5"
ext.sauceRest = "1.0.35"
ext.junitVintageVersion = '5.1.1'
ext.junitPlatformVersion = '1.1.1'
ext.junitJupiterVersion = '5.1.1'
repositories {
mavenCentral()
}
dependencies {
testCompile "org.assertj:assertj-core:${assertj}"
testCompile "org.jbehave:jbehave-core:${jbehave}"
testCompile "org.seleniumhq.selenium:selenium-java:${selenium}"
testCompile "org.jbehave.web:jbehave-web-selenium:${jbehaveWebSelenium}"
testCompile "org.jbehave.site:jbehave-site-resources:3.1.1:@zip"
testCompile "com.saucelabs:saucerest:${sauceRest}"
// JUnit Jupiter API and TestEngine implementation
testCompile("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")
// Allows JUnit 3 and JUnit 4 tests to run
testRuntime("org.junit.vintage:junit-vintage-engine:${junitVintageVersion}")
// Allows tests to run from IDEs that bundle older version of launcher
testRuntime("org.junit.platform:junit-platform-launcher:${junitPlatformVersion}")
}
test {
doFirst {
file('target').mkdirs();
}
doLast {
file('target').delete();
}
}
task(type: Test, 'e2e') {
description 'Runs the E2E tests'
// Use properties for filtering stories
systemProperty "metaFilters", System.getProperty("filter", "")
systemProperty "story", System.getProperty("story", "*")
/*
* JBehave requires the Maven's "target" folder in order
* to obtain the absolute path from relative path.
*/
doFirst {
file('target').mkdirs();
copy {
from(zipTree(jarPath("jbehave-core"))) {
include "style/*"
}
into("build/classes/jbehave/view")
}
copy {
from(zipTree(jarPath("jbehave-site-resources"))) {
include "js/**/*"
include "style/**/*"
include "images/*"
}
into("build/classes/jbehave/view")
}
}
doLast {
file('target').delete();
}
}
def jarPath(String jarName) {
configurations.testCompile.find({ it.name.startsWith(jarName) }).absolutePath
}