|
1 | | -buildscript { |
2 | | - ext { |
3 | | - TESTNG_VERSION = '7.3.0' |
4 | | - CUCUMBER_VERSION = '6.7.0' |
5 | | - APPLICATION_URL = 'http://bstackdemo.com/' |
6 | | - APPLICATION_LOCAL_URL = 'http://localhost:3000/' |
7 | | - |
8 | | - } |
9 | | -} |
| 1 | +/* |
| 2 | + * This file was generated by the Gradle 'init' task. |
| 3 | + */ |
| 4 | + |
10 | 5 | plugins { |
11 | 6 | id 'java' |
| 7 | + id 'maven-publish' |
12 | 8 | } |
13 | | -group 'com.dineshv' |
14 | | -version '1.0-SNAPSHOT' |
| 9 | + |
15 | 10 | repositories { |
16 | | - mavenCentral() |
17 | | -} |
18 | | -dependencies { |
19 | | - testImplementation group: 'org.testng', name: 'testng', version: "$TESTNG_VERSION" |
20 | | - testImplementation group: 'io.cucumber', name: 'cucumber-java', version: "$CUCUMBER_VERSION" |
21 | | - testImplementation group: 'io.cucumber', name: 'cucumber-core', version: "$CUCUMBER_VERSION" |
22 | | - testImplementation group: 'io.cucumber', name: 'cucumber-testng', version: "$CUCUMBER_VERSION" |
23 | | - testImplementation group: 'io.cucumber', name: 'cucumber-picocontainer', version: "$CUCUMBER_VERSION" |
24 | | - implementation group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '3.141.5' |
25 | | - implementation group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1' |
26 | | - implementation group: 'com.browserstack', name: 'browserstack-local-java', version: '1.0.6' |
27 | | - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' |
28 | | - implementation group: 'com.google.guava', name: 'guava', version: '26.0-jre' |
29 | | -} |
30 | | - |
31 | | -tasks.register('on-prem', Test) { |
32 | | - useTestNG() { |
33 | | - suites 'src/test/resources/conf/TestNG_Single.xml' |
34 | | - } |
35 | | - if (System.getProperty("test-name") != null) { |
36 | | - systemProperty("cucumber.filter.name", System.getProperty ("test-name")) |
37 | | - } else { |
38 | | - systemProperty("cucumber.filter.name", "End to End Scenario") |
| 11 | + mavenLocal() |
| 12 | + maven { |
| 13 | + url = uri('https://repository.jboss.org/nexus/content/groups/public-jboss/') |
39 | 14 | } |
40 | | - systemProperty "environment", "local" |
41 | | - systemProperty "application_endpoint", "$APPLICATION_URL" |
42 | | -} |
43 | | -tasks.register('on-prem-suite', Test) { |
44 | | - useTestNG() { |
45 | | - suites 'src/test/resources/conf/TestNG_Single.xml' |
46 | | - } |
47 | 15 |
|
48 | | - systemProperty "environment", "local" |
49 | | - systemProperty "application_endpoint", "$APPLICATION_URL" |
50 | | - |
51 | | -} |
52 | | -tasks.register('docker', Test) { |
53 | | - useTestNG() { |
54 | | - suites 'src/test/resources/conf/TestNG_Single.xml' |
55 | | - } |
56 | | - if (System.getProperty("test-name") != null) { |
57 | | - systemProperty("cucumber.filter.name", System.getProperty ("test-name")) |
58 | | - } else { |
59 | | - systemProperty("cucumber.filter.name", "End to End Scenario") |
| 16 | + maven { |
| 17 | + url = uri('https://repo1.maven.org/maven2/') |
60 | 18 | } |
61 | | - systemProperty "environment", "docker" |
62 | | - systemProperty "application_endpoint", "$APPLICATION_URL" |
63 | | - |
64 | | -} |
65 | | -tasks.register('docker-parallel', Test) { |
66 | | - useTestNG() { |
67 | | - suites 'src/test/resources/conf/TestNG_Parallel.xml' |
68 | | - } |
69 | | - |
70 | | - systemProperty "environment", "docker" |
71 | | - systemProperty "application_endpoint", "$APPLICATION_URL" |
72 | | - |
73 | | -} |
74 | | -tasks.register('bstack-single', Test) { |
75 | | - useTestNG() { |
76 | | - suites 'src/test/resources/conf/TestNG_Single.xml' |
77 | | - } |
78 | | - if (System.getProperty("test-name") != null) { |
79 | | - systemProperty("cucumber.filter.name", System.getProperty ("test-name")) |
80 | | - } else { |
81 | | - systemProperty("cucumber.filter.name", "End to End Scenario") |
| 19 | + |
| 20 | + maven { |
| 21 | + url = uri('https://repository.jboss.org/nexus/content/groups/public') |
82 | 22 | } |
83 | | - systemProperty "environment", "remote" |
84 | | - systemProperty "application_endpoint", "$APPLICATION_URL" |
85 | | - |
86 | | -} |
87 | | -tasks.register('bstack-local', Test) { |
88 | | - useTestNG() { |
89 | | - suites 'src/test/resources/conf/TestNG_Single.xml' |
90 | | - } |
91 | | - if (System.getProperty("test-name") != null) { |
92 | | - systemProperty("cucumber.filter.name", System.getProperty ("test-name")) |
93 | | - } else { |
94 | | - systemProperty("cucumber.filter.name", "End to End Scenario") |
| 23 | + |
| 24 | + maven { |
| 25 | + url = uri('https://oss.sonatype.org/content/repositories/snapshots') |
| 26 | + } |
| 27 | + |
| 28 | + maven { |
| 29 | + url = uri('https://repo.maven.apache.org/maven2/') |
95 | 30 | } |
96 | | - systemProperty "environment", "remote" |
97 | | - systemProperty "application_endpoint", "$APPLICATION_LOCAL_URL" |
98 | | - systemProperty "caps_type", "local" |
99 | | - systemProperty "env_cap_id", "2" |
100 | | - |
101 | 31 | } |
102 | | -tasks.register('bstack-local-parallel', Test) { |
103 | | - useTestNG() { |
104 | | - suites 'src/test/resources/conf/TestNG_Parallel.xml' |
105 | | - } |
106 | | - systemProperty "environment", "remote" |
107 | | - systemProperty "application_endpoint", "$APPLICATION_LOCAL_URL" |
108 | | - systemProperty "caps_type", "local" |
109 | | - |
110 | | - |
| 32 | + |
| 33 | +dependencies { |
| 34 | + implementation 'com.browserstack:browserstack-local-java:1.0.6' |
| 35 | + implementation 'org.apache.commons:commons-lang3:3.11' |
| 36 | + implementation 'io.qameta.allure:allure-testng:2.12.0' |
| 37 | + implementation 'io.qameta.allure:allure-maven:2.10.0' |
| 38 | + implementation 'org.slf4j:slf4j-api:1.7.30' |
| 39 | + implementation 'ch.qos.logback:logback-classic:1.2.3' |
| 40 | + implementation 'org.testng:testng:6.14.3' |
| 41 | + implementation 'org.apache.poi:poi-ooxml:3.9' |
| 42 | + implementation 'org.apache.poi:poi:4.1.2' |
| 43 | + implementation 'io.cucumber:cucumber-java:6.8.2' |
| 44 | + implementation 'io.cucumber:cucumber-core:6.8.2' |
| 45 | + implementation 'io.cucumber:cucumber-jvm:6.8.2' |
| 46 | + implementation 'io.cucumber:cucumber-testng:6.8.2' |
| 47 | + implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.12.2' |
| 48 | + implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.2' |
| 49 | + testImplementation 'org.seleniumhq.selenium:selenium-java:3.141.59' |
| 50 | + testImplementation 'io.cucumber:cucumber-picocontainer:6.8.2' |
111 | 51 | } |
112 | | -tasks.register('bstack-parallel', Test) { |
113 | | - useTestNG() { |
114 | | - suites 'src/test/resources/conf/TestNG_Parallel.xml' |
115 | 52 |
|
116 | | - } |
117 | | - systemProperty "environment", "remote" |
118 | | - systemProperty "application_endpoint", "$APPLICATION_URL" |
| 53 | +group = 'com.browserstack' |
| 54 | +version = '0.0.1-SNAPSHOT' |
| 55 | +description = 'browserstack-examples-cucumber-testng' |
| 56 | +java.sourceCompatibility = JavaVersion.VERSION_1_8 |
119 | 57 |
|
120 | | - |
121 | | -} |
122 | | -tasks.register('bstack-local-parallel-browsers', Test) { |
123 | | - useTestNG() { |
124 | | - suites 'src/test/resources/conf/TestNG_MultipleParallel.xml' |
125 | | - } |
126 | | - systemProperty "environment", "remote" |
127 | | - systemProperty "caps_type", "local" |
128 | | - systemProperty "application_endpoint", "$APPLICATION_LOCAL_URL" |
129 | | - |
| 58 | +publishing { |
| 59 | + publications { |
| 60 | + maven(MavenPublication) { |
| 61 | + from(components.java) |
| 62 | + } |
| 63 | + } |
130 | 64 | } |
131 | | -tasks.register('bstack-parallel-browsers', Test) { |
132 | | - useTestNG() { |
133 | | - suites 'src/test/resources/conf/TestNG_MultipleParallel.xml' |
134 | | - } |
135 | | - systemProperty "environment", "remote" |
136 | | - systemProperty "application_endpoint", "$APPLICATION_URL" |
137 | | - |
138 | | - |
| 65 | + |
| 66 | +tasks.named('test') { |
| 67 | + useTestNG() |
139 | 68 | } |
0 commit comments