You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+97-32
Original file line number
Diff line number
Diff line change
@@ -56,28 +56,6 @@ This repository contains the following Selenium tests:
56
56
- [BrowserStack](#browserstack)
57
57
58
58
59
-
## Configuring the maximum parallel test threads for this repository
60
-
61
-
For all the parallel run configuration profiles, you can configure the maximum parallel test threads by changing the settings below.
62
-
63
-
- BrowserStack
64
-
65
-
Maven:
66
-
67
-
`pom.xml`
68
-
```xml
69
-
<testng.parallel>classes</testng.parallel>
70
-
<testng.threadCount>5</testng.threadCount>
71
-
```
72
-
73
-
Gradle:
74
-
75
-
`gradle.properties`
76
-
```sh
77
-
testngParallel=classes
78
-
testngThreadCount=5
79
-
```
80
-
81
59
## Test Reporting
82
60
83
61
- [Allure reports](#generating-allure-reports)
@@ -102,12 +80,12 @@ This infrastructure points to running the tests on your own machine using simula
102
80
To run the default test scenario (e.g. End to End Scenario) on your own machine, use the following command:
103
81
104
82
Maven:
105
-
```sh
83
+
```sh
106
84
mvn clean test -P on-prem
107
85
```
108
86
109
87
Gradle:
110
-
```sh
88
+
```sh
111
89
gradle clean on-prem
112
90
```
113
91
@@ -176,11 +154,11 @@ This infrastructure points to running the tests on your own machine using simula
176
154
set BROWSERSTACK_ACCESS_KEY=<browserstack-access-key>
177
155
```
178
156
179
-
Alternatively, you can also hardcode username and access_key objects in the [test_caps.json](resources/conf/capabilities/test_caps.json) file.
157
+
Alternatively, you can also hardcode username and access_key objects in the [browserstack.yml](resources/conf/capabilities/browserstack-single.yml) file.
180
158
181
159
Note:
182
-
- We have configured a list of test capabilities in the [test_caps.json](resources/conf/capabilities/test_caps.json) file. You can certainly update them based on your device test requirements.
183
-
- The exact test capability values can be easily identified using the [Browserstack Capability Generator](https://browserstack.com/app-automate/capabilities)
160
+
- We have configured a list of test capabilities in the [browserstack.yml](resources/conf/capabilities/browserstack-single.yml) file. You can certainly update them based on your device / browsertest requirements.
161
+
- The exact test capability values can be easily identified using the [Browserstack Capability Generator](https://browserstack.com/automate/capabilities)
More information on [Upload apps from filesystem](https://www.browserstack.com/docs/app-automate/appium/upload-app-from-filesystem), [Upload apps using public URL](https://www.browserstack.com/docs/app-automate/appium/upload-app-using-public-url) or [Define custom ID for app](https://www.browserstack.com/docs/app-automate/appium/upload-app-define-custom-id).
203
181
182
+
**OR**
183
+
184
+
With Browserstack SDK, all the effort is taken away from the user.
185
+
186
+
All you need to do is add specify the path of your `APK` or `IPA` file in your browserstack.yml as shown below:
187
+
```
188
+
app: ./path/to/my/demo/app.apk
189
+
```
190
+
191
+
If your app does indeed exist in the path provided, the sdk will be able to identify it, upload it, and use it for your tests.
192
+
204
193
### Run a specific test on BrowserStack
205
194
206
-
In this section, we will run a single test on an Android device on Browserstack. To change test capabilities forthis configuration, please refer to the `single` objectin`caps.json` file.
195
+
In this section, we will run a single test on an Android device on Browserstack. To change test capabilities forthis configuration, please refer to the `browserstack-single.yml` fileinresources/conf/capabilities/
207
196
208
197
- How to run the test?
209
198
199
+
- Copy the capabilities to the root of the project:
del /f "browserstack.yml"&& copy /y .\src\test\resources\conf\capabilities\browserstack-single.yml browserstack.yml
212
+
```
213
+
210
214
- To run the default test scenario (e.g. End to End Scenario) on a BrowserStack device, use the following command:
211
215
212
216
Maven:
@@ -240,10 +244,25 @@ In this section, we will run a single test on an Android device on Browserstack.
240
244
241
245
### Run the entire test suite in parallel on a single BrowserStack device
242
246
243
-
In this section, we will run the tests in parallel on a single device on Browserstack. Refer to `single` object in`test_caps.json` file to change test capabilities for this configuration.
247
+
In this section, we will run the tests in parallel on a single device on Browserstack. To change test capabilities forthis configuration, please refer to the `browserstack-parallel.yml` filein resources/conf/capabilities/
244
248
245
249
- How to run the test?
246
250
251
+
- Copy the capabilities to the root of the project:
del /f "browserstack.yml"&& copy /y .\src\test\resources\conf\capabilities\browserstack-parallel.yml browserstack.yml
264
+
```
265
+
247
266
To run the entire test suite in parallel on a single BrowserStack device, use the following command:
248
267
249
268
Maven:
@@ -265,10 +284,26 @@ In this section, we will run the tests in parallel on a single device on Browser
265
284
266
285
### Run the entire test suite in parallel on multiple BrowserStack devices
267
286
268
-
In this section, we will run the tests in parallel on multiple devices on Browserstack. Refer to the `parallel` object in`caps.json` file to change test capabilities for this configuration.
287
+
In this section, we will run the tests in parallel on multiple devices on Browserstack. To change test capabilities forthis configuration, please refer to the `browserstack-parallel-devices.yml` filein resources/conf/capabilities/
269
288
270
289
- How to run the test?
271
290
291
+
- Copy the capabilities to the root of the project:
del /f "browserstack.yml"&& copy /y .\src\test\resources\conf\capabilities\browserstack-parallel-devices.yml browserstack.yml
304
+
```
305
+
306
+
272
307
To run the entire test suite in parallel on multiple BrowserStack devices, use the following command:
273
308
274
309
Maven:
@@ -293,7 +328,7 @@ In this section, we will run the tests in parallel on multiple devices on Browse
293
328
- We will change the response of the `signin` (for the `locked_user`) API endpoint. (File to change: `pages/api/signin.js` line `43`)
294
329
- The API endpoint respond with a specific error, `Your account has been locked.`.
295
330
- We will change that to something generic, like: `Something went wrong.`
296
-
- In this section, we will run a single testcase that changes the API used in BrowserStack Demo app, in a wat that it interact with you local machine. Refer to the `single_local` object in `caps.json` file to change test capabilities for this configuration.
331
+
- In this section, we will run a single testcase that changes the API used in BrowserStack Demo app, in a wat that it interact with you local machine. Refer to the `browserstack-local.yml` file to change test capabilities for this configuration.
297
332
- Note: You may need to provide additional BrowserStackLocal arguments to successfully connect your localhost environment with BrowserStack infrastructure. (e.g if you are behind firewalls, proxy or VPN).
298
333
- Further details for successfully creating a BrowserStackLocal connection can be found here:
299
334
@@ -305,6 +340,21 @@ In this section, we will run the tests in parallel on multiple devices on Browse
305
340
306
341
- How to run the test?
307
342
343
+
- Copy the capabilities to the root of the project:
del /f "browserstack.yml"&& copy /y .\src\test\resources\conf\capabilities\browserstack-local.yml browserstack.yml
356
+
```
357
+
308
358
- To run the default test scenario (e.g. End to End Scenario) on a single BrowserStack device using BrowserStackLocal, use the following command:
309
359
310
360
Maven:
@@ -324,10 +374,25 @@ In this section, we will run the tests in parallel on multiple devices on Browse
324
374
325
375
### [Mobile application using local or internal environment] Run the entire test suite in parallel on multiple BrowserStack devices using BrowserStackLocal
326
376
327
-
In this section, we will run the test cases on a mobile application using a local or internal environment in parallel on multiple devices on Browserstack. Refer to the `parallel_local` object in`caps.json` file to change test capabilities for this configuration.
377
+
In this section, we will run the test cases on a mobile application using a local or internal environment in parallel on multiple devices on Browserstack. To change test capabilities forthis configuration, please refer to the `browserstack-local-parallel-devices.yml` filein resources/conf/capabilities/
328
378
329
379
- How to run the test?
330
380
381
+
- Copy the capabilities to the root of the project:
0 commit comments