-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
68 lines (52 loc) · 1.89 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
group 'com.honeywell'
version '1.0-SNAPSHOT'
apply plugin: 'java'
sourceCompatibility = 1.8
def bobcatVersion = '2.1.0'
def cucumberVersion = '4.8.0'
def aemDependency = 'bb-aem-64'
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile group: 'com.cognifide.qa.bb', name: 'bb-core', version: bobcatVersion
compile group: 'com.cognifide.qa.bb', name: 'bb-aem-core', version: bobcatVersion
compile group: 'com.cognifide.qa.bb', name: 'bb-aem-64', version: bobcatVersion
compile group: 'com.cognifide.qa.bb', name: 'bb-cumber', version: '1.4.0'
compile "io.cucumber:cucumber-java:$cucumberVersion"
compile "io.cucumber:cucumber-java8:$cucumberVersion"
compile "io.cucumber:cucumber-guice:$cucumberVersion"
// https://mvnrepository.com/artifact/junit/junit
testCompile group: 'junit', name: 'junit', version: '4.4'
}
def cucumberArgs = ['--plugin', 'pretty',
'--plugin', 'html:build/cucumber-html-report',
'--plugin', 'json:build/cucumber-json-report.json',
'--glue', 'com.honeywell.honeywell',
'src/test/resources']
def profiles = [
'firefox': 'firefox'
]
configurations {
cucumberRuntime {
extendsFrom testRuntime
}
}
task cucumber() {
def profile = System.getProperty('profile', 'default')
if (!profile.equals('default')) {
System.setProperty('bobcat.config.contexts', profile)
}else {
System.setProperty("webdriver.chrome.driver","C:\\tools\\selenium-drivers\\chrome\\chromedriver.exe")
}
dependsOn assemble, compileJava, compileTestJava
doLast {
javaexec {
main = "cucumber.api.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args = cucumberArgs
systemProperties = System.getProperties()
}
}
}