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

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 acknowlegment by GoodFirms and explore the significance of this accolade in the sphere of software testing.
General
Performance testing
Test automation
gaming-qa
24 August 2023,
by a1qa
4 min read
Ready, steady, test: How QA drives seamless gaming experiences
Why is QA pivotal for delivering unmatched player experiences? How to level up video game quality? Find the answers in the article.
Cybersecurity testing
Functional testing
Localization testing
Performance testing
Quality assurance
Test automation
Usability testing
debated technologies
30 May 2023,
by a1qa
3 min read
a1qa tech voice: Managing director at a1qa, North America, discusses pros and cons of much-debated technologies
Nadya Knysh, Managing director at a1qa, North America, puts a spotlight on 6 current technologies, discussing their positives and negatives.
General
Interviews
Test automation
why-do-bugs-get-missed
17 April 2023,
by a1qa
4 min read
Why do bugs get missed? Learn the problems and tips to avoid them
Still, finding overlooked bugs after the app goes live? Let’s find out why this happens and how to fix it.
Quality assurance
Test automation
Mobile app testing
15 February 2023,
by a1qa
4 min read
Mobile app testing guide: win the race with five-star software
Which aspects of mobile apps to test first to produce a really high-quality product? Find the answer to this and other questions related to mobile app testing in the article.
Cybersecurity testing
Functional testing
Mobile app testing
Performance testing
Test automation
Usability testing
a1qa-articles
31 January 2023,
by a1qa
5 min read
Best of 2022 by executives: 8 most visited a1qa blog posts
Let’s look back and revisit the most visited a1qa articles of 2022!
Quality assurance
Test automation
qa-trends
12 January 2023,
by a1qa
4 min read
The future of software testing: top 4 impactful trends that will dominate in 2023
Consider the major industry trends for the upcoming year to know how to improve current QA strategies and stay ahead of the curve.
QA trends
Quality assurance
Test automation
test-automation
7 December 2022,
by Dileep Marway
3 min read
Release at pace with test automation: What, why, and how to measure success?
An automation-first approach is key to enhancing testing capabilities and increasing overall operational efficiency. However, I would suggest justifying its implementation, so that it can deliver the promised value.
Quality assurance
Test automation
interview-with-dileep
28 November 2022,
by a1qa
9 min read
Interview with Dileep Marway on a series of articles “Agility and speed: Supercharging your business strategies with QA”
We cooperated with the VP of Engineering and Quality at SHL to present you with a series of his blog posts on: culture of happiness, test automation, and Agile-driven QA. Happy reading!
Agile
Quality assurance
Software lifecycle QA
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.