After doing your first steps in mobile testing on iOS devices please find the following chapters providing detailed information on more advanced topics and testing scenarios.
Before getting started with iOS test automation, it's necessary to choose the connection type that suites your needs. The following overview helps you to find out which connection type will work best for you.
|Record||Replay||Start/Stop App||Install IPA||Deploy (unattended)|
Note: To make an iOS app testable with Ranorex, it is necessary to instrument the app. However, for a quick start you can take your first steps with the pre-instrumented KeePass app (see Getting Started) that is provided for download.
iTunes is necessary to establish a USB connection (debug mode and non-debug mode) because iTunes installs the USB driver on the Windows machine to connect to iOS devices.
When choosing "Wi-Fi" as connection type, it is recommended that you have your system under test plugged into a power supply during test recording and execution. Additionally make sure that the system under test (the mobile devices) and the machine running the tests (where Ranorex is installed) are on the same network.
Note: In order to automate your own mobile app it needs to be instrumented guided by the instructions in the section Instrumentation and Preparation.
- Connect your iOS device (Wi-Fi or USB). See Infrastructure for pros and cons.
- Go to the mobile download archive on your device using the QR Code above or the url bitly.com/mArchive.
- Download and install the iOS service app and make sure it is started on your device.
- Download and install the sample app and initially start it to let the service app recognize it.
- Add the device in Ranorex using the Device Wizard. You'll find more details in the section Adding Your iOS device
- Start your mobile recording
Note: There is a small sample delivered with Ranorex Studio (can be found on the start page) that shows how the iOS MiniKeePass app can easily be tested with Ranorex.
Record and Run an iOS Test
Action #1 is a 'Deploy iOS App' action which deploys the given app to the selected device.
Action #2 is a 'Run Mobile App' action which resets the instrumented app on the selected device.
Action #3 is a Touch Event on a button. There are two different kinds of touch events recognized by Ranorex:
- A normal 'Touch' which is equivalent to a mouse click on a desktop machine,
- A 'Long Touch' which can be compared to a right click.
Note: The duration for both 'Touch' and 'Long Touch' can be defined in the properties pane. You can open this pane by clicking the context menu item 'Properties' on the 'Touch Event' action item.
Action #4 is a 'Set Value' action, which is typically used for keyboard input.
Action #5 is a 'Mobile Key Press' action. With a 'Mobile Key Press' action you can simulate the 'Enter' button on your devices keyboard.
Action #6 is a 'Wait For Not Exists' action, which is useful for cases where an item indicates a loading process and the automation should continue after the item has disappeared.
Action #7 is a 'Validate' action as was previously described.
Action #8 is a 'Get Value' action, which can be used to write back an attribute value of a control to a variable for further processing.
Action #9 is a 'Report' action, which is used to add information to the test report.
Action #10 is an 'Invoke Action' which performs a scroll action on a table control to its index '0'. Invoke actions directly call the corresponding method of the selected adapter.
You can use the invoke action to call user-defined methods or get and set user-defined members.
To call such a user-defined method
- Type 'CallMethod' into the action name field of the invoke action
- Add the method name to the first argument field
- In the following argument field enter a value or choose a variable you want to pass to the method
- Repeat the previous step for all additional arguments
To get or set a member, use 'GetMember' or 'SetMember' instead of 'CallMethod' as the action name.
For further details about invoke action, have a look at Lesson 5: Ranorex Recorder - Additional Editing Options - Invoking User-Defined Actions.
User-defined methods can also be invoked from code in the same way. Here is a short example:
string text = (string) repo.App.Text.Element.InvokeAction("CallMethod", "myCustomGetTextMethod");
Dim text As String = DirectCast(repo.App.Text.Element.InvokeAction("CallMethod", "myCustomGetTextMethod"), String)
Action #11 is a 'Close Application' action. 'Close Application' actions stop the selected application on the mobile device.
After performing the test on the mobile device, the recording process can be stopped by pressing the 'Stop' button.
After recording and altering the action table, the test can be executed on the mobile device by pressing the 'Run' button.
- Ranorex Studio - The Layout
- Lesson 1: Getting Started
- Lesson 2: Ranorex Modules - Test Actions
- Lesson 3: Data-Driven Testing
- Lesson 4: Ranorex Test Suite
- Lesson 5: Ranorex Recorder
- Lesson 6: UI Mapping with Ranorex Repository
- Lesson 7: Code Modules
- Lesson 8: Reporting
- Lesson 9: Ranorex Spy
- Ranorex Settings
- Ranorex Remote
- User Code Library
- Code Examples
- Data Connectors
- Instrumentation Wizard
- Technology Instrumentation
- RanoreXPath Weight Rule Library
- Ranorex UI Adapter
- Mobile Testing
- Android Testing
- iOS Testing
- Web Testing
- Source Control
- Ranorex Studio IDE
- Visual Studio Integration
- System Requirements
- 64-bit Platforms
- Remotely Working with Ranorex
- Silent Installation of Ranorex
- XCOPY Deployment
- How to instructions