XCUIApplication: setting a custom primary location

In Xcode 7, Apple added XCUITest as a new and preferred way to test the user interface of your application.

I want to transfer my old testing script, but have not found any information on how to install a custom kernel when using XCUITest.

Old challenge:

UIATarget.localTarget().setLocation({latitude: '48.21048', longitude: '16.3595'}); 

I also tried to find some information on how to provide a GPX file as a workaround using start arguments, but had no success and no idea if this is possible and what the key would be.

Does anyone know how to configure a custom kernel using XCUITest?

+7
ios xcode xcode-ui-testing core-location xcode-bots
source share
1 answer

WWDC Session 409 Advanced Testing and Continuous Integration WWDC 2016 offers a great key to this.

In short, this is not possible. At least from Xcode 8.

Apple engineers in the video adjust the location - or rather, turn off the location - manually, using the simulator settings.

To run Bot against a specific location, you must first create a new simulator using Xcode Device CI devices. Then edit the bot and select "iOS Special Devices" on the "Devices" tab.

+4
source share

All Articles