-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
57 lines (49 loc) · 1.64 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
plugins {
id 'java'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.seleniumhq.selenium:selenium-java:4.1.4'
testImplementation 'io.cucumber:cucumber-java:7.3.4'
testImplementation 'io.cucumber:cucumber-testng:7.3.4'
testImplementation 'io.cucumber:cucumber-core:7.3.4'
compileOnly 'com.browserstack:browserstack-java-sdk:latest.release'
}
group = 'com.browserstack'
version = '1.0-SNAPSHOT'
description = 'cucumber-java-browserstack'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
def browserstackSDKArtifact = configurations.compileClasspath.resolvedConfiguration.resolvedArtifacts.find { it.name == 'browserstack-java-sdk' }
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(Test) {
systemProperties = System.properties
}
task sampleTest(type: Test) {
systemProperty "cucumber.publish.quiet", "true"
systemProperty "cucumber.features", "src/test/resources/features/test"
systemProperties System.getProperties()
useTestNG() {
dependsOn clean
useDefaultListeners = true
suites "src/test/resources/testng.xml"
jvmArgs "-javaagent:${browserstackSDKArtifact.file}"
}
scanForTestClasses = false
}
task sampleLocalTest(type: Test) {
systemProperty "cucumber.publish.quiet", "true"
systemProperty "cucumber.features", "src/test/resources/features/localtest"
systemProperties System.getProperties()
useTestNG() {
dependsOn clean
useDefaultListeners = true
suites "src/test/resources/testng.xml"
jvmArgs "-javaagent:${browserstackSDKArtifact.file}"
}
scanForTestClasses = false
}