Unable to launch an Xcode UI Test with xcuitrunner

1

I'm trying to launch an Xcode UI Test (the Facebook/Appium WebDriverAgent in this case) on a Windows PC using Quamotion's xcuitrunner.

I'm using version 0.114.18, which I've downloaded from http://docs.quamotion.mobi/quamotion4appium/xcuitrunner/.

However, when I launch xcuitrunner on the command line, I get the following output:

Quamotion Xcode UI Test Runner version 0.114.18+34d082af40
Machine ID: XXXXXXXX

Specify --help for a list of available options and commands.

Is this as expected? What's next? I'd like to connect to the WebDriverAgent and get the properties of the UI controls on the app on the device?

Jacob Peeters

Posted 2019-05-16T08:10:27.597

Reputation: 29

Answers

0

You can launch the xcuitrunner using the following syntax:

xcuitrunner.exe run -d [path to your developer profile] -p [password for your developer profile] -k [path to the directory containing the developer disk images]

You need to replace the values between square brackets with the actual values for your PC.

When the xcuitrunner starts, you should see output like this:

Quamotion Xcode UI Test Runner version 0.114.18+34d082af40
Machine ID: XXXXXXXX
Using a license for  which expires on 1/1/2020 1:00:00 AM

The Xcode UI Test will be resigned:
- Developer Certificate: [Your Certificate]
- Provisioning Profile: [Your Provisioning Profile]

Starting the Xcode UI Test
2019-05-07 11:42:51.046729+0200 WebDriverAgentRunner-Runner[513:143347] Running tests...
objc[513]: Class GCDAsyncSocketPreBuffer is implemented in both /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/CocoaAsyncSocket.framework/CocoaAsyncSocket (0x10559c578) and /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/RoutingHTTPServer.framework/RoutingHTTPServer (0x105509358). One of the two will be used. Which one is undefined.
objc[513]: Class GCDAsyncReadPacket is implemented in both /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/CocoaAsyncSocket.framework/CocoaAsyncSocket (0x10559c5c8) and /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/RoutingHTTPServer.framework/RoutingHTTPServer (0x1055093a8). One of the two will be used. Which one is undefined.
objc[513]: Class GCDAsyncWritePacket is implemented in both /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/CocoaAsyncSocket.framework/CocoaAsyncSocket (0x10559c618) and /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/RoutingHTTPServer.framework/RoutingHTTPServer (0x1055093f8). One of the two will be used. Which one is undefined.
objc[513]: Class GCDAsyncSpecialPacket is implemented in both /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/CocoaAsyncSocket.framework/CocoaAsyncSocket (0x10559c668) and /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/RoutingHTTPServer.framework/RoutingHTTPServer (0x105509448). One of the two will be used. Which one is undefined.
objc[513]: Class GCDAsyncSocket is implemented in both /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/CocoaAsyncSocket.framework/CocoaAsyncSocket (0x10559c6b8) and /private/var/containers/Bundle/Application/FD8EAB15-BD59-40FE-941C-756506186612/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/RoutingHTTPServer.framework/RoutingHTTPServer (0x105509498). One of the two will be used. Which one is undefined.
Test Suite 'All tests' started at 2019-05-07 11:42:53.213
XCTestOutputBarrier
Test Suite 'WebDriverAgentRunner.xctest' started at 2019-05-07 11:42:53.233
XCTestOutputBarrier
Test Suite 'UITestingUITests' started at 2019-05-07 11:42:53.249
XCTestOutputBarrier
Test Case '-[UITestingUITests testRunner]' started.
XCTestOutputBarrier
    t =     0.01s Start Test at 2019-05-07 11:42:53.275
    t =     0.04s Set Up
2019-05-07 11:42:53.368596+0200 WebDriverAgentRunner-Runner[513:143347] Built at Mar  8 2019 13:46:49
2019-05-07 11:42:53.578806+0200 WebDriverAgentRunner-Runner[513:143347] ServerURLHere->http://10.9.8.50:8100<-ServerURLHere
2019-05-07 11:42:53.585966+0200 WebDriverAgentRunner-Runner[513:143397] Using singleton test manager
- done. Took 17s

The WebDriverAgent session is ready at http://localhost:50140/session/A5EF3EEC-3B2F-4959-82B1-390077C1356C

Hit CRTL-C to stop the Xcode UI Test

The URL in the output is the endpoint at which the server is running. This URL will be different every time you start the xcuitrunner.

This server is a Selenium/WebDriver/Appium server. You can connect to this server directly over HTTP. For example, you could go to http://localhost:50140/session/A5EF3EEC-3B2F-4959-82B1-390077C1356C/source (make sure to replace the first part with the actual values on your side) to get the DOM of the screen currently displayed on the device.

There are also examples of how you can interact with this server from the command line: https://github.com/facebook/WebDriverAgent/wiki/Queries

You can also use an Appium or WebDriver client library in your programming language of choice and request it to connect to the Appium server at this URL. How you can do that depends on the programming language you use.

Frederik Carlier

Posted 2019-05-16T08:10:27.597

Reputation: 179

I launched the command with the options you specified. Unfortunately, it does not move beyond the following line: Specify --help for a list of available options and commands. I do not get the lines shown in your output below. Am I doing something wrong? – Jacob Peeters – 2019-05-16T08:23:35.297

You are missing the run keyword after xcuitrunner.exe. Instead of xcuitrunner.exe -d [developer profile] -p [developer profile password] -k [devimg directory, try xcuitrunner.exe run -d [developer profile] -p [developer profile password] -k [devimg directory] – Frederik Carlier – 2019-05-16T08:25:39.517

Ah, that was it. Thanks! – Jacob Peeters – 2019-05-16T08:29:12.417