-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maestro CLI unable to connect to XCUI test runner started from Xcode #1816
Comments
I can confirm the behavior of maestro running on port Here is my evidence to confirm this: First let's confirm that
|
This is a breaking change. Maestro 1.36.0 and before uses port 22087 by default. Maestro version 1.37.0 and beyond use 7001 For details see: - jpudysz#16 - mobile-dev-inc/maestro#1816
Context
I was developing #1809, I needed to run my local build of
maestro-ios-xctest-runner
. I wanted to run the server directly from Xcode (reasons: debugging, easy to see logs) by:export USE_XCODE_TEST_RUNNER=1
screenshot 1
However this does not work. It tries to connect to port 7001, which is incorrect on iOS. The correct port on iOS to connect to is 22087.
I added some debug logs (see PR #1815):
and discovered this wrong 7001 port comes from here:
maestro/maestro-cli/src/main/java/maestro/cli/command/TestCommand.kt
Lines 215 to 218 in 83f7c11
screenshot 2
Details
Workaround 1
Run my own build of
maestro-ios-xctest-runner
and let Maestro CLI start it (i.e. do not start the server by clicking the "Play" button in Xcode):unset USE_XCODE_TEST_RUNNER
./maestro-ios-xctest-runner/build-maestro-ios-runner.sh
./maestro test <flow>
Workaround 2
Setting the port explicitly to the correct value (
22087
- port of the server running in XCTest) fixes the problem. To do it, replace this code:maestro/maestro-cli/src/main/java/maestro/cli/command/TestCommand.kt
Lines 215 to 218 in 83f7c11
with:
That code in
TestCommand
that determines the port was added in #1732.The text was updated successfully, but these errors were encountered: