-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
65 lines (52 loc) · 2.2 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
plugins {
id 'java'
}
group 'cucumber-java-page-factory'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
task upgradeGradle(type: Wrapper) {
gradleVersion = '5.0'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-bin.zip"
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'io.cucumber', name: 'cucumber-java8', version: '4.2.0'
testCompile group: 'io.cucumber', name: 'cucumber-junit', version: '4.2.0'
testCompile group: 'io.cucumber', name: 'cucumber-spring', version: '4.2.0'
testCompile group: 'org.seleniumhq.selenium', name: 'selenium-support', version: '3.141.59'
testCompile group: 'org.seleniumhq.selenium', name: 'selenium-chrome-driver', version: '3.141.59'
testCompile group: 'org.seleniumhq.selenium', name: 'selenium-edge-driver', version: '3.141.59'
testCompile group: 'org.seleniumhq.selenium', name: 'selenium-firefox-driver', version: '3.141.59'
testCompile group: 'org.seleniumhq.selenium', name: 'selenium-ie-driver', version: '3.141.59'
testCompile group: 'org.seleniumhq.selenium', name: 'selenium-opera-driver', version: '3.141.59'
testCompile group: 'org.springframework', name: 'spring-context', version: '5.1.3.RELEASE'
testCompile group: 'org.springframework', name: 'spring-test', version: '5.1.3.RELEASE'
testCompile group: 'org.assertj', name: 'assertj-core', version: '3.12.2'
}
task deleteCucumberReports(type: Delete) {
dependsOn(clean)
delete 'out', 'target', 'build'
}
/**
* to run Cucumber tests with custom runTests task and with default browser, type:
* 'runTests'
*
* to run Cucumber tests with custom runTests task and with chosen browser, type:
* '-Dbrowser=chrome runTests'
* '-Dbrowser=firefox runTests'
* '-Dbrowser=chromeHeadless runTests'
* '-Dbrowser=iexplorer runTests'
*
* to run Cucumber tests with chosen browser, type:
* 'clean -Dbrowser=chrome test'
* 'clean -Dbrowser=firefox test'
* 'clean -Dbrowser=chromeHeadless test'
* 'clean -Dbrowser=iexplorer test'
*/
task runTests (type: Test){
dependsOn(deleteCucumberReports)
systemProperty "browser", System.getProperty("browser")
}