Skip to content

feat: run tests on several local devices at once - #2

Open
stanleykim-ux wants to merge 7 commits into
mainfrom
feat/parallel-local-devices
Open

feat: run tests on several local devices at once#2
stanleykim-ux wants to merge 7 commits into
mainfrom
feat/parallel-local-devices

Conversation

@stanleykim-ux

Copy link
Copy Markdown

Summary

Lets Playwright run N workers with one local device or emulator each.

  • One Appium server per run, started in globalSetup and torn down at the end (no more per-test pkill -f appium).
  • New device.devices: [{ udid, avd? }] list; worker slot parallelIndex uses entry N. Single udid still works.
  • Slot-unique session ports (systemPort, wdaLocalPort, mjpegServerPort, derivedDataPath).
  • Emulator provider boots missing AVDs / simulators; shared AVDs run -read-only.
  • Driver install is skipped when already installed. Fails fast when workers exceeds configured devices.

Test-facing fixtures (device, persistentDevice) are unchanged. Docs in docs/config.md#running-on-multiple-local-devices.

Verified

Two Android emulators with workers: 2, retry on the same slot, legacy no-udid config, guard rail, unit tests. Not run on physical devices or iOS hardware.

🤖 Generated with Claude Code

stanleykim-ux and others added 5 commits September 4, 2026 09:54
Add DeviceEntry/devices config, slot helpers, and stubs for the shared
Appium server lifecycle and emulator boot.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- globalSetup starts a single Appium server on a free port, exports it via
  APPWRIGHT_APPIUM_PORT, installs the driver only when missing, and returns
  a teardown that stops the server and shuts down emulators it booted
- device.devices[] assigns a device per worker slot (parallelIndex) with
  slot-unique systemPort / wdaLocalPort / mjpegServerPort / derivedDataPath
- emulator provider boots missing AVDs / simulators in globalSetup
- fixtures no longer restart Appium after every test
- docs, example config, changeset, unit tests for slot helpers

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… grace

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- entries without avd boot the first installed AVD (old behaviour)
- with nothing configured and no device online, boot emulator-5554
- every instance of an AVD used by several entries is started -read-only
- skip emu kill for emulator processes that already exited

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…2e run

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@stanleykim-ux
stanleykim-ux marked this pull request as ready for review September 4, 2026 15:26
stanleykim-ux and others added 2 commits September 8, 2026 11:28
… detected on macOS

On macOS/BSD, binding 127.0.0.1:port succeeds while another process holds
0.0.0.0:port, so the probe never fell back and two concurrent runs both
tried to start Appium on 4723.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… is taken

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant