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: appium/scripts/README.md
+40-2Lines changed: 40 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,15 @@ The script checks all of these up front and prints the exact install command for
56
56
57
57
> **CI vs local:** CI runs on BrowserStack (Node 24) without this script. Notification-dependent tests (in `02_push.spec.ts` and `12_activity.spec.ts`) are skipped on BrowserStack iOS via `isBrowserStackIos()` because BrowserStack requires an Enterprise Signing Certificate for those notification flows, which we don't have yet (temporary — they'll be re-enabled once signing support is available), so for now they only run locally. If your local Node is 26+, the script sets `WDIO_USE_NATIVE_FETCH=1` automatically.
58
58
59
+
### Per-SDK prerequisites
60
+
61
+
`bootstrap.sh` handles the shared tooling. Individual SDKs need a bit more the first time:
62
+
63
+
-**All wrapper SDKs:** install the SDK repo's own deps once (`bun install` in the repo root). `build.sh` packs the SDK from source but does not install its deps.
64
+
-**flutter:** enable Swift Package Manager once — `flutter config --enable-swift-package-manager`. Without it, `flutter build ios` falls back to CocoaPods, which fails on the prebuilt OneSignal XCFramework with `Multiple commands produce …/XCFrameworkIntermediates/…`.
65
+
-**dotnet:** the demo targets **.NET 10**, so use the **official .NET 10 SDK** (Homebrew's `dotnet` can't install workloads), then `dotnet workload install maui`. iOS builds require **Xcode 26.6 / iOS 26.5 SDK** — run `xcodebuild -downloadPlatform iOS` to get the matching simulator runtime. On Apple Silicon, if the tarball SDK is killed with "Code Signature Invalid", ad-hoc re-sign it (`codesign --force --sign - …`).
66
+
-**unity:** install the exact editor the demo pins — see `examples/demo/ProjectSettings/ProjectVersion.txt` (e.g. `6000.4.11f1`) — **with the iOS Build Support module**, and activate a Unity license (Unity Hub → Preferences → Licenses). On recent macOS, `brew install rsync`: Apple's bundled `openrsync` fails the Unity XCFramework dSYM copy during the Xcode build.
67
+
59
68
## Usage
60
69
61
70
```bash
@@ -69,7 +78,7 @@ If `--platform` or `--sdk` are not provided, the script prompts interactively.
`run-all.sh` loops `run-local.sh` over every SDK/platform combo and prints a PASS/FAIL summary.
131
+
132
+
```bash
133
+
./run-all.sh # every combo, both platforms
134
+
./run-all.sh --platform=ios # iOS only
135
+
./run-all.sh --sdks=flutter,react-native # subset of SDKs
136
+
./run-all.sh --releases # check out the latest release point per repo first
137
+
./run-all.sh --bail # stop after the first failing combo
138
+
```
139
+
140
+
`--releases` runs `checkout-releases.sh`, which checks out the newest stable `rel/X.Y.Z` branch (or newest semver tag for expo/ios) in each SDK repo, honoring the `*_DIR` overrides from `.env`. Repos with uncommitted changes are skipped, never clobbered.
141
+
142
+
> Within each combo the specs still **bail on the first failing test** locally (`mochaOpts.bail = isLocal`), so one early failure hides the specs after it.
143
+
119
144
### Environment Variables
120
145
121
146
All env vars can be set in `.env` or exported in your shell. See [`.env.example`](.env.example) for the full list.
@@ -125,6 +150,15 @@ All env vars can be set in `.env` or exported in your shell. See [`.env.example`
125
150
|`ONESIGNAL_APP_ID`| -- | OneSignal app ID (written to demo app `.env`) |
126
151
|`ONESIGNAL_API_KEY`| -- | OneSignal REST API key |
127
152
|`FLUTTER_DIR`|`../../OneSignal-Flutter-SDK`| Path to the Flutter SDK repo |
|`APP_PATH`| auto-detected from build | Path to `.app` or `.apk`|
129
163
|`BUNDLE_ID`|`com.onesignal.example`| App bundle/package ID |
130
164
|`DEVICE`|`iPhone 17` / `Samsung Galaxy S26`| Device name for WebdriverIO |
@@ -147,10 +181,14 @@ All env vars can be set in `.env` or exported in your shell. See [`.env.example`
147
181
148
182
-**Appium fails to start**: Make sure Appium and the required drivers are installed (`appium driver list --installed`). The script checks both up front and prints the install command for anything missing.
149
183
150
-
-**`vpx: command not found`**: Install [Vite+](https://vite.plus)with `curl -fsSL https://vite.plus | bash`. If `vp` is installed but`vpx`is missing, run`vp --version` once — `vp` creates the `vpx` symlink on its first run.
184
+
-**`vpx: command not found`**: Run `./bootstrap.sh` (installs Vite+ and creates the `vpx` symlink), or install manually with `curl -fsSL https://vite.plus | bash`. The installer sometimes omits the`vpx`symlink — if`vp` exists but `vpx` doesn't, create it and open a new shell: `ln -sf ../current/bin/vp ~/.vite-plus/bin/vpx`. (The npm `vite-plus` package ships no `vpx`.)
151
185
152
186
-**`UND_ERR_INVALID_ARG` / fetch errors on Node 26+**: webdriverio's undici dispatcher is rejected by Node 26+'s `fetch`. The script exports `WDIO_USE_NATIVE_FETCH=1` automatically when it detects Node 26+; if you invoke `vpx wdio run` manually, export it yourself.
153
187
154
188
-**Test waiting for the notification permission alert fails**: A reused simulator remembers a previously-decided notification permission, and `simctl privacy` can't reset it. The script's app reset uninstalls the app, which restores the prompt — avoid `--skip`/`--skip-reset` when running the push specs.
155
189
156
190
-**Misleading "element not displayed" failures**: Live in-app marketing campaigns on the configured app can cover the UI. Use the OneSignal app dedicated to Appium tests (set `ONESIGNAL_APP_ID`/`ONESIGNAL_API_KEY` in `.env`) rather than a general or shared app.
191
+
192
+
-**Only a few specs ran before the suite stopped**: Local runs bail on the first failing test (`mochaOpts.bail = isLocal`), so one early failure masks the specs after it. Use `--spec` to isolate a spec, or fix the first failure and re-run.
193
+
194
+
-**Image-notification / Live-Activity tests fail locally**: The `02_push` image test and `12_activity` are skipped on BrowserStack and only run locally, so they need manual attention. The image test's attachment check can be too short for the simulator (rich media downloads slower than the wait), so it may flake — confirm manually by sending the notification and long-pressing the banner to see the attached image.
0 commit comments