-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
54 lines (44 loc) · 1.46 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
plugins {
id 'java'
}
group 'cucumber-java-selenide-customWebDriver'
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-java', version: '4.2.0'
testCompile group: 'io.cucumber', name: 'cucumber-junit', version: '4.2.0'
testCompile group: 'io.cucumber', name: 'cucumber-picocontainer', version: '4.2.0'
testCompile group: 'com.codeborne', name: 'selenide', version: '5.1.0'
}
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=firefoxHeadless runTests'
*
* to run Cucumber tests with chosen browser, type:
* 'clean -Dbrowser=chrome test'
* 'clean -Dbrowser=firefox test'
* 'clean -Dbrowser=chromeHeadless test'
* 'clean -Dbrowser=firefoxHeadless test'
*/
task runTests (type: Test){
dependsOn(deleteCucumberReports)
systemProperty "browser", System.getProperty("browser")
}