As companies focus on rolling out mobility strategies that include mobile apps, developers and testers are feeling increased pressure to deliver high quality apps under very tight timelines. Mobile application testing software can help alleviate some of that pressure by helping to reduce testing time, but there are big differences in the approach used by today’s mobile testing software to test mobile apps.
One important difference is how mobile objects are dealt with by the test tool. There are two popular approaches to this: use of an object repository and calling functions from the script. Mobile app testing software that uses the functions-based approach will often have a limited number of objects that use function arguments to define an object or area of a screen. This approach can be very cumbersome as these functions are not specific to the actual objects within the application.
This method is often used with an image-based testing approach. That is, functions are used to visually find an object on the screen by using image matching mechanisms and optical character recognition (OCR). The function arguments often tell a script where and how to find an object and any type of information that can help interact or return information.
By using an object repository to manage objects, you can store information for each specific user interface element in an application. This is often the approach used when instrumentation utilized to gather objects from the mobile application and return them to the testing tool. These native objects contain properties that are specific to a particular type of control and are then managed within the object repository.
The Case for the Object Repository
The object repository allows testers to manage objects in one location. When you go a step further and use a repository of objects, you hold all of the information about a particular object in one place — in a repository. All of its attributes are right there – the color, text, position, etc., which helps improve tester productivity and meet rapid development schedules.
Having this centralized location to store information about objects makes it easy for a tester to build a script. By using the object repository, the tester does not have to think about putting arguments in a function to define an object as well as interact with it. Testers simply build the scripts with the objects that have already been defined. Placing objects in an object repository, rather than as arguments to functions in your code, can help save time and help testers develop more complete and accurate tests.
Code Refactoring and the Object Repository
It’s not only convenient to have your objects in one location – it’s practical as well – especially for code refactoring. If your attributes are inserted throughout your code and you have a lengthy and complex script, you’re going to face some challenges if that attribute needs to change. Without an object repository in your mobile testing software, you’ll need to change the attributes for every call within a script as well every script that wants to interact with that particular object.
Instead, if you use an object repository, which can be shared across many tests, the object properties can be managed in one place and referenced throughout the tests. Because object properties support regular expressions and parameterization, it is easy to enhance the ability of objects to be found. All of this is managed outside of the test and allows a tester to make an object change without having to update every test requiring that object.
Cross Platform Testing with an Object Repository
By using mobile app testing software that relies on an object repository, you can easily transport scripts from platform to platform. This saves on testing time and makes it more efficient to test apps across multiple platforms.
When the attributes are located in a repository, you can change them there rather than having to refactor the code for each operating system. Considering most mobile apps need to be usable on both iOS and Android, and there are multiple variations of each, a repository can improve testing speed and capabilities.
All in all, using an object repository in your mobile testing software can help testers meet important goals and deadlines. Placing objects in an object repository rather than as arguments to functions in your code can save time and help testers develop more complete and accurate tests. Not to mention, using an object repository is the same approach testers take for Web and desktop automated testing.
[social-bio]






