Blog

Mobile test automation with Appium

What should you consider when planning to automate your mobile testing? Check it out in the article. 
15 January 2018
Mobile app testing
Test automation
The article by a1qa
a1qa

Test automation isn’t a new topic discussed by the software development and testing community. However, mobile test automation is a relatively fresh trend. And the demand for the service is continuously growing. Mainly, it is attributed to the fact that mobile apps get more functionality and adopt the role of the desktop PC.

However, the attempt to get the market share first doesn’t always allow for timely testing. Manual testers don’t manage to run all regression tests as fast as needed. And this is where automation comes to help.

Benefits of mobile test automation

The main benefits of automated testing for mobile apps coincide with those typical of web apps testing:

  • Automated tests run faster than the manual ones
  • No human errors
  • Opportunity to perform simultaneous testing across various devices
  • Coverage of multiple localizations

The advantages are significant, yet the drawbacks are also worth consideration:

  • Once the operating system is updated, automated tests will stop functioning until the framework is also updated.
  • It takes more time to develop a test automation script for mobile apps. Compare: one script for web apps takes 8 hours, while for mobile an engineer will have to spend about 20 hours.
  • Many mobile test automation tools lack stability.
  • UI components differ from one mobile platform to another. Due to the overall variety, it’s very difficult to come up with a single tool that will go well with all kinds of UI. It’s either technically impossible or the development will cost too much and bring the benefit from automation to nothing.
  • Special requirement to iOS: all .ipa files should be signed with a development identity.

Choosing the right approach and tools for automation

When it comes to development test automation scripts for web apps, there are very few questions arise. Selenium WebDriver is highly-adopted open-source framework appreciated by all professional QA teams.

However, with mobile apps the situation is a bit different and the choice isn’t that obvious.

The main question, by the way, isn’t related to tools selection, but to the approach. The selected approach will predefine the tools and the automation process.
Generally, there are two techniques to automate mobile apps testing:

  • Record and Play
  • Screen Object-Mapping

Record and Play used to be very popular in the early days. The software records and logs all actions performed by the manual tester, including every mouse movement, clicks, and screenshots, and develops the code that will test the app.

Pros: fast implementation, no knowledge in programming is required
Cons: the test scripts can not be tweaked and as soon as the app is changed, the script should be re-recorded

Another technique is UI elements mapping. The approach is commonly known as Screen Object-Mapping.

All UI elements are treated as an object class, and the identifier for this class is stored in the object map.

The approach works as follows. The test script contains the logical name for the object. When the automation engine of the test framework reads the test data (login and password), it picks up the logical name of the object, select the class identifier from the object map, calls the wrapper function for the object class “Login page,” and performs the required action.

Pros:
The code is reusable
The test script is reliable and isn’t sensitive to app changes
Easy-to-understand logic

Cons:
Programming knowledge is required
Time-consuming development of scripts

We recommend to implement the second approach to provide thorough testing of the software. If you in-house team lacks the knowledge, consider hiring the third-party QA vendors to perform automation.

When you’ve selected the approach, it’s time to consider the available tools and choose the right one.

There is a great number of test automation frameworks. In the picture below you can see the most popular of them. Pay attention that some of them are language-specific (Xamarin for C# apps only). Some of them may appear to be too costly (Ranorex, for example).

test automation frameworks for mobile apps

That’s why it’s very important to weigh all pros and cons of the process and of the tool before making a sensible decision.

The a1qa team recommends paying attention to the Appium framework.

Appium — best choice for mobile automation for iOS and Android

Appium is a free open-source test automation tool for native, hybrid and mobile web apps, tested on simulators (iOS, FirefoxOS), emulators (Android), and real devices.

One of the key advantages of Appium is the support for different scripting languages: Java, Ruby, Python, C#, PHP.

Before getting down to work with Appium, it’s necessary to set up the environment composed of the following elements:

QA team to perform mobile test automation.


Let us elaborate. First of all, we install Appium Server that will map the initially generated code with various devices or emulators.

Then it’s turn to install Xcode and Android Studio with Android SDK. This will enable us to run tests on emulators, if you want to.

After defining the programming language that will be used for developing test scripts, it’s vital to install the pack of libraries. For instance, if your choice is Java language, then you’ll need Java Development Kit.

Once the software is installed, take care of the app itself. You’ll need .apk file for Android products or .ipa files for iOS. These files function as containers and make sure that the selected app can be uploaded to the necessary device.

Real devices vs emulators

Real devices or emulators? This is probably the most troublesome question for the engineers who perform testing of mobile apps. We won’t talk much about it now, as we’ve previously addressed the issue here.

The main point is that while using emulators is less expensive, it will put additional pressure on the machines thus slowing down testing.

Also, the results delivered by testing on emulators are not always valid. It’s not a rare case that test results on emulators are positive, while the launch on a real device is blocked and the test fails.

Considering this fact, the a1qa automation engineers run tests on real devices only.

Summing up

If you’ve decided that mobile apps test automation is what you need on your project, make sure that the chosen approach and framework will benefit to your team and project requirements. By identifying this, you’ll build solid foundation for achieving the main goal – deliver a high-quality product within the set time limits.

More Posts

Enhancing Agile and DevOps processes
28 February 2024,
by a1qa
4 min read
4 actionable tips to enhance Agile and DevOps processes 
Streamlining Agile and DevOps workflows? Learn practical recommendations on how to achieve this.
Agile
General
Test automation
Navigating the future: QA trends that will define 2024. Part 1
15 January 2024,
by a1qa
4 min read
Navigating the future: QA trends that will define 2024. Part 1
Discover topical software testing trends that will shape 2024 and empower companies to smoothly implement advanced technologies.
Agile
QA trends
Quality assurance
Test automation
The year in valuable conversations: recapping 2023 a1qa’s roundtables for IT executives 
8 December 2023,
by a1qa
3 min read
The year in valuable conversations: recapping 2023 a1qa’s roundtables for IT executives 
From dissecting novel industry trends to navigating effective ways of enhancing software quality — let’s recall all a1qa’s roundtables. Join us!
Big data testing
Cybersecurity testing
Functional testing
General
Interviews
Performance testing
QA trends
Quality assurance
Test automation
Usability testing
Web app testing
na-st-awards-23
16 November 2023,
by a1qa
3 min read
a1qa shines as the finalist in three categories of the North American Software Testing Awards
a1qa is a triple finalist at the North American Software Testing Awards.
General
Quality assurance
Test automation
3 November 2023,
by a1qa
4 min read
From idea to buying: 7 testing types to make your mobile eCommerce solutions flawless
Read the article to discover 7 QA activities helping boost mobile eCommerce solutions quality and provide end users with exceptional buying experiences.
Functional testing
General
Quality assurance
Test automation
Usability testing
On the way to Web 3.0: key software testing aspects for seamless digital experiences. Part 2
12 October 2023,
by a1qa
4 min read
On the way to Web 3.0: key software testing aspects for seamless digital experiences. Part 2
Let’s analyze essential software testing checks to improve the quality of the business-critical Web 3.0 functionality.
Cybersecurity testing
Functional testing
Performance testing
Quality assurance
Test automation
Usability testing
On the way to Web 3.0: key software testing aspects for seamless digital experiences. Part 1
11 October 2023,
by a1qa
4 min read
On the way to Web 3.0: key software testing aspects for seamless digital experiences. Part 1 
In part 1 of this article, learn about the transformation to a new Internet era, Web 3.0, and its benefits for increasing operational efficiency.
General
QA trends
Quality assurance
Software lifecycle QA
Test automation
goodfirms-lists
26 September 2023,
by a1qa
2 min read
a1qa’s recognition by GoodFirms: A testament to our expertise
Delve into a1qa's recent acknowledgment by GoodFirms and explore the significance of this accolade in the sphere of software testing.
General
Performance testing
Test automation
ai-ml-test-automation-mini
21 September 2023,
by a1qa
5 min read
6 activities to supercharge test automation with AI and ML
How to maximize the benefits of test automation? Learn how to do it via applying AI and ML.
Test automation

Get in touch

Please fill in the required field.
Email address seems invalid.
Please fill in the required field.
We use cookies on our website to improve its functionality and to enhance your user experience. We also use cookies for analytics. If you continue to browse this website, we will assume you agree that we can place cookies on your device. For more details, please read our Privacy and Cookies Policy.