Non-UI testing on iOS | Ranorex
Help CenterUser GuideWeb and mobile testing

Non-UI Testing on iOS

In addition to automating testing of the user interface of mobile applications, it’s also possible to perform non-UI tests invoking technology-dependent actions (see ⇢ Detailed list of actions).

This feature allows you to get information about the devices hardware, the operating system etc.

To enable this feature you have to additionally link the library libRxDeviceInfos.a as well as the following libraries:

  • AVFoundation.framework 
  • CoreTelephony.framework 
  • SystemConfiguration.framework 
  • ExternalAccessory.framework
Now you are able to get the info on your iOS device directly by right-clicking the mobile device in Ranorex Spy.

Get device info on an iOS test device

You can access the device information during your test automation within User Code Actions as well as Code Modules.

The code should look something like the following:

var app = repo.iOSApp.Self.As(); // get an iOSDeviceInfo object holding all available device info var info = app.GetDeviceInfo(); // Report e.g. the IP address of the device Report.Info("IP address: " + info.IpAddress);
Dim app = repo.iOSApp.Self.[As](Of IosApp)() ' get an iOSDeviceInfo object holding all available device info Dim info = app.GetDeviceInfo() ' Report e.g. the IP address of the device Report.Info("IP address: " & Convert.ToString(info.IpAddress))

Reference

For further information about code modules and user code actions please have a look at the sections Ranorex Studio Expert > ⇢ Code modules and Ranorex Studio Fundamentals > ⇢ User code actions.