How to run XCUITest natively on Mobile Center hosted devices?


With Xcode 8, Apple has deprecated UIAutomation in favour of the XCUITest framework.

As XCTest and UI test recorder is an integral part of Xcode, setting up and implementing UI tests with it is pretty straightforward - this what drives the popularity of this framework in the iOS development/testing community. 

However, the question of managing the test bed of real mobile devices still remains valid. Also, the question is how those devices can be leveraged when XCUITest framework is used for test automation?

There are many articles of how to implement XCUITest execution on cloud or hosted devices, however Micro Focus Mobile Center is taking it to the next level with simplicity of the solution! This can be achieved thanks to DevAccess feature of Mobile Center, that virtually connects Mobile Center hosted device to the local workstation. 

Here is simple 2 steps "how to":

1. Use DevAccess feature to connect the device to your Mac machine, where the tests are exists:

2. Using XCode, use the virtually connected device from MC to execute the tests

Please check the attached video that demonstrates this capability.


Mobile Center also provides a capability to execute XCUITests in command-line mode, using Mac or even Windows or Linux! But this is another subject for the blog.



How To-Best Practice
Comment List