-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
55 lines (44 loc) · 1.6 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
plugins {
id 'java'
}
group 'cucumber-java-selenide-configuration'
version '1.0-SNAPSHOT'
task upgradeGradle(type: Wrapper) {
gradleVersion = '5.0'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-bin.zip"
}
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'io.cucumber', name: 'cucumber-java', version: '4.3.0'
testCompile group: 'io.cucumber', name: 'cucumber-junit', version: '4.3.0'
testCompile group: 'io.cucumber', name: 'cucumber-picocontainer', version: '4.3.0'
testCompile group: 'com.codeborne', name: 'selenide', version: '5.2.2'
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 chosen browser, type:
* '-Dselenide.browser=chrome runTests'
* '-Dselenide.browser=firefox runTests'
* '-Dselenide.browser=ie runTests'
*
* to run Cucumber tests with headless mode, type:
* '-Dselenide.browser=chrome -Dselenide.headless=true runTests'
*
* to run Cucumber tests with chosen browser, type:
* 'clean -Dselenide.browser=chrome test'
* 'clean -Dselenide.browser=firefox test'
* 'clean -Dselenide.browser=ie test'
*/
task runTests (type: Test){
dependsOn(deleteCucumberReports)
systemProperty "selenide.browser", System.getProperty("selenide.browser")
systemProperty "selenide.headless", System.getProperty("selenide.headless")
}