|
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 { |
| 11 | + mavenLocal() |
16 | 12 | mavenCentral() |
| 13 | + google() |
| 14 | +// maven { |
| 15 | +// url = uri('https://repository.jboss.org/nexus/content/groups/public-jboss/') |
| 16 | +// } |
| 17 | +// |
| 18 | +// maven { |
| 19 | +// url = uri('https://repo1.maven.org/maven2/') |
| 20 | +// } |
| 21 | +// |
| 22 | +// maven { |
| 23 | +// url = uri('https://repository.jboss.org/nexus/content/groups/public') |
| 24 | +// } |
| 25 | +// |
| 26 | +// maven { |
| 27 | +// url = uri('https://oss.sonatype.org/content/repositories/snapshots') |
| 28 | +// } |
| 29 | +// |
| 30 | +// maven { |
| 31 | +// url = uri('https://repo.maven.apache.org/maven2/') |
| 32 | +// } |
17 | 33 | } |
| 34 | + |
18 | 35 | 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' |
| 36 | + implementation 'io.cucumber:cucumber-jvm:6.10.4' |
| 37 | + testImplementation 'org.seleniumhq.selenium:selenium-java:3.141.59' |
| 38 | + testImplementation 'com.browserstack:browserstack-local-java:1.0.6' |
| 39 | + testImplementation 'org.apache.commons:commons-lang3:3.11' |
| 40 | + testImplementation 'org.slf4j:slf4j-api:1.7.30' |
| 41 | + testImplementation 'ch.qos.logback:logback-classic:1.2.3' |
| 42 | + testImplementation 'org.testng:testng:7.4.0' |
| 43 | + testImplementation 'io.cucumber:cucumber-java:6.10.4' |
| 44 | + testImplementation 'io.cucumber:cucumber-core:6.10.4' |
| 45 | + testImplementation 'io.cucumber:cucumber-picocontainer:6.10.4' |
| 46 | + testImplementation 'io.cucumber:cucumber-testng:6.10.4' |
| 47 | + testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.12.2' |
| 48 | + testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.12.2' |
29 | 49 | } |
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") |
39 | | - } |
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 | 50 |
|
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") |
60 | | - } |
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") |
82 | | - } |
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") |
| 51 | +group = 'com.browserstack' |
| 52 | +version = '0.0.1-SNAPSHOT' |
| 53 | +description = 'browserstack-examples-cucumber-testng' |
| 54 | +java.sourceCompatibility = JavaVersion.VERSION_1_8 |
| 55 | + |
| 56 | +publishing { |
| 57 | + publications { |
| 58 | + maven(MavenPublication) { |
| 59 | + from(components.java) |
| 60 | + } |
95 | 61 | } |
96 | | - systemProperty "environment", "remote" |
97 | | - systemProperty "application_endpoint", "$APPLICATION_LOCAL_URL" |
98 | | - systemProperty "caps_type", "local" |
99 | | - systemProperty "env_cap_id", "2" |
100 | | - |
101 | | -} |
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 | | - |
111 | 62 | } |
112 | | -tasks.register('bstack-parallel', Test) { |
113 | | - useTestNG() { |
114 | | - suites 'src/test/resources/conf/TestNG_Parallel.xml' |
115 | 63 |
|
116 | | - } |
117 | | - systemProperty "environment", "remote" |
118 | | - systemProperty "application_endpoint", "$APPLICATION_URL" |
119 | | - |
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 | | - |
130 | | -} |
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 | | - |
| 64 | +tasks.named('test') { |
| 65 | + useTestNG() { |
| 66 | + suites 'src/test/resources/conf/testng.xml' |
| 67 | + parallel = 'methods' |
| 68 | + threadCount = 30 |
| 69 | + } |
139 | 70 | } |
0 commit comments