Often the biggest consideration when testing mobile applications is the ability to test across different devices, and also different OS platforms.
The ideal goal is to achieve such coverage with minimal effort expended on script rework, and indeed duplication of your test scripts. T-Plan Robot allows you to reach this goal simply and efficiently through a single test script, and the use of "image collections".
As T-Plan Robot automates at the screen level it drives your application through the displayed components. Assuming your application follows the same flow rules for navigation etc then your action list need not change, however the images used to find these components may. So what does this mean in terms of your automation script...
Taking a blind example for the moment, the application flow may be as follows:
- Launch app
- Tap Username field
- Type username
- Tap Password field
- Type password
- Tap Login
- From application Home screen, tap Portfolio
- Tap View Account
- Tap Generate Report
As you can see the flow within the application should be the same regardless of the target environment. As a result your test script can also contain these same actions which can be performed during each execution regardless of target environments. However, identification of where each action should be performed, in terms of the visual screen, may differ. To allow for this within Robot you simply allow your script to reference a collection of images as opposed to a single image. This is an extremely efficient way of scripting which promotes a number of benefits:
- Quickly and easily expand test environment coverage by adding to your existing image collections
- Test new devices without any script rework
- Test new mobile platforms without any script rework
- Consistent reporting across test environments
So how would such a script look within T-Plan Robot... well, funnily enough almost identical to the action list above.
In the following example code we first create a 'procedure' which becomes a reusable piece of code allowing the subsequent code to be very simple and minimal. Naturally any of this code can be changed as desired.
# First create the reusable 'tap' procedure:
image collections' it can easily be executed against many different target environments and operating systems with zero impact on the code.Given that the above code utilises '
Video showing multiple GUI Test Executions
Essentially, the testing of any platform is achieved the same way when using T-Plan Robot. The tests for mobile applications are designed, executed and debugged in exactly the same way as a desktop application or a web application or any other type of application - using visual references and real end user actions.