Automated Testing of Mobile Applications. UIAutomation

Automated Testing of Mobile Applications. UIAutomation
July 16 10:00 2011 Print This Article

I’ll start with the standard solutions from Apple, which is included to the Instruments.

UIAutomation allows to conduct JavaScript test scripts in an emulator or on the device. Only test applications collected in the Debug-mode and installed with the Development code-sign can be tested. It is no required to compile additional libraries. You can run scripts from the console.

Apple has developed a special JavaScript API for testing. It describes all the standard user interface elements. Elements are presented as a tree; there are special functions for fast sampling of the types of elements (buttons, tableViews, textFields …). Unless specifically set in the code Accessibility Label then the elements can be selected only by number.

window.tableViews () [0]. visibleCells () [1]. tap ()

The choice of the second cell in the first table.

I wrote a test script for our Goozy application, it logs in, checks that tab «All» selected, goes to the tab «Settings» and logs out.

I spent an hour on writing of this script; I held beside me an open XCode and watched how the elements are represented in the designer, whether they are dynamically generated. The scripts are written in a small window (at skrishnote UIAutomation it is shown at right), there is no syntax checking, there is no support for control systems version.

[Highlighted Code:]

So the platform is powerful and correct, but the testers are unlikely to be able to write their own tests, changing the internal interface structure you will have to rewrite tests.

Related Posts:

  • No Related Posts

About Article Author

view more articles
Nataliia Vasylyna

View More Articles