Skip to content

Commit eb5f69a

Browse files
authored
docs: update BrowserStack mobile config (#497)
1 parent 6f99b69 commit eb5f69a

8 files changed

Lines changed: 47 additions & 22 deletions

File tree

docs/Basic_Config/basicConfig2.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,29 @@ mobile_udid=00008110-001A23456789AB01
7272

7373
---
7474

75+
## BrowserStack Native Apps
76+
77+
When `executionAddress=browserstack`, SHAFT can start native mobile sessions from either a BrowserStack app URL or a remote app value in `mobile_app`:
78+
79+
```properties title="src/main/resources/properties/custom.properties"
80+
executionAddress=browserstack
81+
targetOperatingSystem=ANDROID
82+
mobile_automationName=UiAutomator2
83+
mobile_deviceName=Google Pixel 7
84+
mobile_platformVersion=13.0
85+
86+
# Preferred when you already know the uploaded BrowserStack app URL
87+
browserStack.appUrl=bs://<uploaded-app-id>
88+
89+
# Also supported for remote app references when browserStack.appUrl is not set
90+
# mobile_app=bs://<uploaded-app-id>
91+
# mobile_app=https://example.com/apps/MyApp.apk
92+
```
93+
94+
If both `browserStack.appUrl` and `mobile_app` point to remote app values, `browserStack.appUrl` takes precedence. Use local `mobile_app` paths when SHAFT should upload the app for you.
95+
96+
---
97+
7598
## Mobile Web (Browser on Device)
7699

77100
For mobile browser testing, configure the same properties as [Web GUI](./basicConfig) and add the mobile target:

docs/Best_Practices/Cross_Platform_Strategy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ public void testLogin() {
8282
:::tip
8383
Switch platforms by changing a single property — no code changes needed:
8484
```properties title="src/main/resources/properties/custom.properties"
85-
targetPlatform=ANDROID
85+
targetOperatingSystem=ANDROID
8686
```
8787
Or override it from the command line:
8888
```bash
89-
mvn test -DtargetPlatform=IOS
89+
mvn test -DtargetOperatingSystem=IOS
9090
```
9191
:::
9292

@@ -134,5 +134,5 @@ my-company-tests/
134134
For most teams, starting with a **single project** is the best default. You get maximum code reuse and a single source of truth for your test scenarios. If the apps diverge significantly over time, you can always split later.
135135

136136
:::info
137-
SHAFT Engine's property-based platform switching makes it easy to run the same tests against both platforms from a single project. Just parameterize `targetPlatform` in your CI/CD pipeline.
137+
SHAFT Engine's property-based platform switching makes it easy to run the same tests against both platforms from a single project. Just parameterize `targetOperatingSystem` in your CI/CD pipeline.
138138
:::

docs/Getting_Started/Flutter_Testing.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ SHAFT includes `appium_flutterfinder_java` (v1.0.12) **transitively** via `com.s
7676
Add these properties to `src/main/resources/properties/custom.properties`:
7777

7878
```properties title="src/main/resources/properties/custom.properties"
79-
# Target platform: Android or IOS
80-
targetPlatform=Android
79+
# Target operating system: ANDROID or IOS
80+
targetOperatingSystem=ANDROID
8181

8282
# Appium Flutter Driver automation name
8383
mobile_automationName=FlutterIntegration

docs/Getting_Started/first_steps_6.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ AppiumDriver driver = new AndroidDriver(new URL("http://localhost:4723"), caps);
211211

212212
```java title="After — SHAFT (capabilities in custom.properties)"
213213
// custom.properties:
214-
// targetPlatform=ANDROID
214+
// targetOperatingSystem=ANDROID
215215
// executionAddress=127.0.0.1:4723
216216
// mobile_automationName=UIAUTOMATOR2
217217
// mobile_app=src/test/resources/apps/MyApp.apk

docs/Getting_Started/integrations.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ executionAddress=https://hub-cloud.browserstack.com/wd/hub
6363
targetBrowserName=chrome
6464

6565
# Credentials (use environment variables in CI)
66-
browserStack.user=${BROWSERSTACK_USERNAME}
67-
browserStack.key=${BROWSERSTACK_ACCESS_KEY}
66+
browserStack.userName=${BROWSERSTACK_USERNAME}
67+
browserStack.accessKey=${BROWSERSTACK_ACCESS_KEY}
6868

6969
# Capabilities
7070
browserStack.os=Windows
@@ -79,12 +79,12 @@ browserStack.buildName=Build 1
7979

8080
```properties title="custom.properties"
8181
executionAddress=https://hub-cloud.browserstack.com/wd/hub
82-
targetPlatform=ANDROID
82+
targetOperatingSystem=ANDROID
8383

84-
browserStack.user=${BROWSERSTACK_USERNAME}
85-
browserStack.key=${BROWSERSTACK_ACCESS_KEY}
84+
browserStack.userName=${BROWSERSTACK_USERNAME}
85+
browserStack.accessKey=${BROWSERSTACK_ACCESS_KEY}
8686

87-
mobile_app=bs://your_uploaded_app_hash
87+
browserStack.appUrl=bs://your_uploaded_app_hash
8888
mobile_deviceName=Google Pixel 7
8989
mobile_platformVersion=13.0
9090
```
@@ -126,7 +126,7 @@ lambdaTest.build=Build 1
126126

127127
```properties title="custom.properties"
128128
executionAddress=https://mobile-hub.lambdatest.com/wd/hub
129-
targetPlatform=ANDROID
129+
targetOperatingSystem=ANDROID
130130

131131
lambdaTest.user=${LAMBDATEST_USERNAME}
132132
lambdaTest.accessKey=${LAMBDATEST_ACCESS_KEY}

docs/Getting_Started/setup_mobile.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Configure your mobile target in `src/main/resources/properties/custom.properties
3434

3535
```properties
3636
# Platform
37-
targetPlatform=ANDROID
37+
targetOperatingSystem=ANDROID
3838

3939
# Appium server
4040
executionAddress=127.0.0.1:4723
@@ -57,7 +57,7 @@ mobile_autoGrantPermissions=true
5757

5858
```properties
5959
# Platform
60-
targetPlatform=IOS
60+
targetOperatingSystem=IOS
6161

6262
# Appium server
6363
executionAddress=127.0.0.1:4723
@@ -130,9 +130,9 @@ Run on real devices in the cloud:
130130
```properties
131131
# BrowserStack
132132
executionAddress=https://hub.browserstack.com/wd/hub
133-
browserStack.user=YOUR_USERNAME
134-
browserStack.key=YOUR_ACCESS_KEY
135-
mobile_app=bs://your_app_hash
133+
browserStack.userName=YOUR_USERNAME
134+
browserStack.accessKey=YOUR_ACCESS_KEY
135+
browserStack.appUrl=bs://your_app_hash
136136

137137
# LambdaTest
138138
executionAddress=https://mobile-hub.lambdatest.com/wd/hub

docs/Getting_Started/shaft_wizard.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ driver.quit();
9797
**Switch to Android with two properties:**
9898

9999
```properties
100-
targetPlatform=ANDROID
100+
targetOperatingSystem=ANDROID
101101
mobile_automationName=UIAUTOMATOR2
102102
executionAddress=127.0.0.1:4723
103103
mobile_app=src/test/resources/apps/MyApp.apk
@@ -107,7 +107,7 @@ mobile_deviceName=Pixel_7_API_34
107107
**Switch to iOS:**
108108

109109
```properties
110-
targetPlatform=IOS
110+
targetOperatingSystem=IOS
111111
mobile_automationName=XCUITEST
112112
executionAddress=127.0.0.1:4723
113113
mobile_app=src/test/resources/apps/MyApp.app

docs/Properties/PropertiesList.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,8 @@ This section lists all configurable properties related to Swagger/OpenAPI contra
726726
### BrowserStack
727727

728728
- These properties control SHAFT's built-in integration with BrowserStack.
729+
- Use the canonical authentication keys `browserStack.userName` and `browserStack.accessKey`; the legacy aliases `browserStack.user` and `browserStack.key` are normalized for compatibility.
730+
- For native mobile apps, `browserStack.appUrl` is resolved before remote `mobile_app` values such as `bs://...`, `http://...`, or `https://...`.
729731
- You can find all supported Web-based (Desktop or Mobile) execution properties & values in BrowserStack's [Web Capability Generator](https://www.browserstack.com/docs/automate/capabilities)
730732
- You can find all supported Native Mobile App execution properties & values in BrowserStack's [Appium Capability Generator](https://www.browserstack.com/app-automate/capabilities?tag=w3c)
731733

@@ -741,10 +743,10 @@ This section lists all configurable properties related to Swagger/OpenAPI contra
741743
| browserStack.accessKey | `` | | BrowserStack access key for authentication. |
742744
| browserStack.platformVersion | `` | | Mobile platform version for BrowserStack execution. |
743745
| browserStack.deviceName | `` | | Mobile device name for BrowserStack execution. |
744-
| browserStack.appUrl | `` | | Use appUrl to test a previously uploaded app file. |
746+
| browserStack.appUrl | `` | | Use a BrowserStack app URL for a previously uploaded app; takes precedence over remote `mobile_app`. |
745747
| browserStack.customID | `` | | Use customID to test the latest uploaded version as the above url expires regularly. |
746748
| browserStack.appName | `` | | App name for uploading to BrowserStack. |
747-
| browserStack.appRelativeFilePath | `` | | Relative file path to the app for uploading to BrowserStack. |
749+
| browserStack.appRelativeFilePath | `` | | Relative file path to the app for SHAFT/BrowserStack upload workflows. |
748750
| browserStack.osVersion | `` | | In case of Desktop web testing you must also set the `targetOperatingSystem`, and `targetBrowserName`.|
749751
| browserStack.browserVersion | `` | | Browser version, optional, uses random by default. |
750752
| browserStack.local | `false` | `true`, `false` | Enable BrowserStack local testing. |

0 commit comments

Comments
 (0)