Unable to run Test Suite on iOS Simulator


I cannot get Test Suites to run on iOS Simulator devices.

Following the guide at https://docs.katalon.com/display/KD/Mobile+on+macOS I am unable to create a provisioning profile in Xcode.

I have changed the “Product Bundle Identifier” to “io.appium.WebDriverAgentRunner” and various alternatives but no luck, and am able to build both the WebDriverAgentLib and WebDriverAgentRunner (I get a “Build Succeeded” message).

Do I need to rename the “Product Bundle Identifier” to something specific?

I am able to run:

xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=4AE3673B-8013-4164-96F4-1702D54BB67E' test

Note: The id belongs to iPhone X (11.2) [4AE3673B-8013-4164-96F4-1702D54BB67E] (Simulator) using ‘instruments -s devices’

The output is

Test Suite 'All tests' started at 2018-04-18 16:17:43.118Test Suite 'WebDriverAgentLib.framework' started at 2018-04-18 16:17:43.121Test Suite 'WebDriverAgentLib.framework' passed at 2018-04-18 16:17:43.121.     Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) secondsTest Suite 'WebDriverAgentRunner.xctest' started at 2018-04-18 16:17:43.122Test Suite 'UITestingUITests' started at 2018-04-18 16:17:43.122Test Case '-[UITestingUITests testRunner]' started.    t =     0.00s Start Test at 2018-04-18 16:17:43.126    t =     0.01s Set Up2018-04-18 16:17:43.132361+0100 WebDriverAgentRunner-Runner[24521:3999923] Built at Apr 17 2018 16:38:052018-04-18 16:17:43.151317+0100 WebDriverAgentRunner-Runner[24521:3999923] ServerURLHere-><-ServerURLHere

When I run:

export DEVICE_URL=''export JSON_HEADER='-H "Content-Type: application/json;charset=UTF-8, accept: application/json"'curl -X GET $JSON_HEADER $DEVICE_URL/status

I get the following:

curl -X GET $JSON_HEADER $DEVICE_URL/statuscurl: (6) Could not resolve host: applicationcurl: (3) Port number ended with 'a'curl: (7) Failed to connect to port 8100: Connection refused 

Im not sure where to go from here as i cant find other resources to help me progress.

Thanks for any help / advice.

Hi Jason,

  1. When starting the WebDriverAgent, it’s going to default to port 0 (hence the “ServerURLHere-><-ServerURLHere” message) It’s unlikely your machine will let you connect to port 0, so to start it on a different port, make sure you include the “USE_PORT” environment variable:
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=4AE3673B-8013-4164-96F4-1702D54BB67E' test USE_PORT=8100
  1. When you’re using curl to connect, it can help to wrap the variables in quotes to make sure they are not broken up and treated as individual arguments:
curl -X GET "$JSON_HEADER" "$DEVICE_URL/status"

Hope this helps!


Hi Chris

Thanks for helping, i haven’t had the chance to take a look yet so will update once iv tried out. Cheers.