iOs app Testing Using Ranorex
My Previous blog was on the basic concepts of the Ranorex and now in this blog I am just trying to explain how Ranorex will be useful for the iOS App Testing.
As with most development, developing mobile apps uses an agile way of working. Testing an app manually can be repetitive and time-consuming. In line with sprint based development, test automation for mobile has increased in popularity among app developers, speeding up their work processes and encouraging and better and more robust results.
Ranorex framework support test automation for iOS, Android & windows app
Introduction
To automate apps on mobile devices, these devices need to be connected to a computer with Ranorex installed. The connection can be accomplished either with a USB cable or over Wi-Fi
USB Requirements
iTunes is necessary to establish a USB connection because iTunes installs the USB driver on the Windows machine to connect to iOS devices.
Network Requirements
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.
Add Device
To add your iOS with ranorex perform following steps;
· Go to Devices
· Click on Add
· Select iOS option & click on next
· Select USB option & click on next
· Select your device & click on finish
Now the device is successfully added.
Record and Run an iOS Test
After preparing the device and instrumenting the app, the recording can be started by choosing the device on which the test should be executed and the app to be tested.
Mobile recording with chosen target technology...
Select device and app
During the recording process, the action table of the Ranorex Recorder will give a good overview of the steps performed as the table is updated live.
During recording, it is possible to add validations using the Validation button. By pressing this button, a dialog will open where the element which is to be validated can be selected.
Select element to validate
After choosing an element, the 'Validate Element' dialog will pop up. In this dialog, the attributes to be validated can be selected.
Choose attribute to validate
In addition to recording actions directly, it is also possible to add actions to the action table at a later time. This can be done by dragging a repository item to the action table and choosing the action which should be performed from the menu.
After recording and adding actions, the action table might look something like the following.
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.
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.
Stop Recording
After performing the test on the mobile device, the recording process can be stopped by pressing the 'Stop' button.
Run Test
After recording and altering the action table, the test can be executed on the mobile device by pressing the 'Run' button.
You will get the result as follows ;
Excellent Dhanashri..keep posting:-)
very nice and helpful...!
Nice blog dhanashri........(y)