Mobile Test Pyramid

Mobile testers need to take a different approach when it comes to Test Automation.

Anyone who is involved in software testing and software Test Automation should know the Test Automation pyramid introduced by Mike Cohn (www.mountaingoatsoftware.com/).

This article contains excerpts from my book Hands-On Mobile App Testing published with Pearson Education.

As you can see in the following image, the typical pyramid consists of three layers. At the bottom, there is the automated unit-testing layer, in the middle the automated integration testing layer and at the top there is the automated end-to-end testing layer (including the user interface tests). Each layer has a different size, indicating the number of tests that should be written within each stage. Manual testing is not part of the test pyramid, hence it is shown as a cloud for additional testing work.

But this pyramid is not applicable to mobile apps and mobile test automation. Mobile testing requires a totally different set of testing activities like movement, sensors, different devices and networks compared to other software like desktop or web applications. Lots of manual testing is required to be sure that a mobile app is working as expected in the different usage scenarios.

Mobile Test Automation tools are currently not as mature as their counterparts for web and desktop applications, which leads to a flipped Test Automation pyramid. As the tools become increasingly mature, this pyramid is likely to flip back again because the default Test Automation pyramid is based on a more stable foundation (see the pyramid image below).

The default pyramid therefore can’t be used as an indicator for Test Automation and Manual Testing in the mobile world. The flipped testing pyramid looks like this: In this version of the pyramid, the automated unit testing layer is the smallest one. This is the case because not

The flipped testing pyramid looks like this:

In this version of the pyramid, the automated unit testing layer is the smallest one. This is the case because not every unit or method of mobile apps can be tested in an isolated manner. In some cases, different APIs, layers or systems may need to be faked or mocked in order to get the small unit to work. This is also the case for every other software application, but in some cases mocking or faking other systems for mobile apps is much more complex. This is not efficient from a technical or economic point of view. However, it’s no excuse for not writing mobile unit tests at all. The main logic of an app can/must be tested at the unit level.

The next stage is the end-to-end Test Automation layer. Within this layer, the whole app is tested from a user perspective. It will be tested to make sure the whole system is working, from the app’s user interface through to the backend system via a wireless network, including integration testing with different libraries or APIs. The integration testing layer is therefore part of the end-to-end layer.

The biggest change in this pyramid is that manual testing is part of it. Mobile testing requires lots of Manual Testing, and this can’t be replaced by Test Automation or any other tools yet.

Nevertheless, mobile Test Automation is a really important topic and every mobile tester should be able to write automated regression tests that provide fast feedback about the current quality state of an app. Furthermore, Test Automation helps the team build a reliable and robust mobile app that makes the customers happy.

Mobile Test Pyramid

The flipped testing pyramid has no stable foundation and mobile testing requires lots of Manual Testing, which is why I created my own mobile test pyramid consisting of four layers including Manual and Automated steps. The biggest layer of the pyramid is Manual Testing and forms the strong foundation for every mobile app project, followed by end-to-end testing, beta testing and a top layer comprising unit testing. The grey parts of the pyramid indicate the automated steps and the white parts are the Manual Testing steps. The beta-testing layer is new to the pyramid but essential to every mobile app project. Keeping the high expectations of the mobile users in mind requires this layer to be part of every mobile project to get early feedback from your mobile customers. You can either use a crowd testing approach for your beta testing or you can ask your colleagues to beta test early versions of your app to provide important feedback.

Note: The End-2-End and Unit tests layers can also be swapped as well as the beta and End-2-End layer. The amount of End-2-End tests and Unit tests can differ from project to project and from app to app.

I used this mobile test pyramid in several projects and it helped me set up a reliable, effective and valuable testing process.

If you want to read more about mobile testing, please have a look at my book Hands-On Mobile App Testing which is available as a printed copy as well as an eBook. More details under: http://www.handsonmobileapptesting.com/ or in any other online or offline bookstore.

#HappyTesting!

Daniel Knott
Daniel is a mobile testing expert working as Senior Software Test Engineer at XING’s Android team. He started his software testing career in 2003 as a trainee at IBM Germany. After his time at IBM, Daniel studied computer science with a focus on software development and testing. Since 2009, Daniel has worked for companies such as Accenture, AOE and XING. In several agile development projects he tested web, desktop or mobile applications. However, mobile testing became his passion and since the beginning of 2011 he is working in the mobile development and testing industry. He worked and is working with several mobile test automation tools such as Robotium, Calabash for iOS/ Android, Espresso and Keep It Functional. With the help of this tools, he developed a fully automated testing environment for Android and iOS. Daniel likes to share his knowledge and therefore he started to share his experience on his blog at http://www.adventuresinqa.com as well as in several testing magazines. Daniel is a well-known mobile expert, a speaker at various conferences in Europe and since 2014, he is the author of the book “Hands-On Mobile App Testing“, more information about the book can be found at http://www.handsonmobileapptesting.com. Get in touch with Daniel:
– XING: Profile ( www.xing.com/profile/Daniel_Knott )
Daniel Knott on Twitter

The Related Post

Understanding the benefits and challenges of Automating ERP is critical. According to SAP, ERP (Enterprise Resource Planning) “is the core processes that are needed to run a company: finance, human resources, manufacturing, supply chain, services, procurement, and others. At its most basic level, ERP integrates these processes into a single system. But new ERP systems ...
In recent years, much attention has been paid to setting up Test Automation frameworks which are effective, easy to maintain, and allow the whole testing team to contribute to the testing effort. In doing so, we often leave out one of the most critical considerations of Test Automation: What do we do when the Test ...
September Issue 2019: Advancing Automation
This article was developed from concepts in the book Global Software Test Automation: Discussion of Software Testing for Executives. Introduction There are many potential pitfalls to Manual Software Testing, including: Manual Testing is slow and costly. Manual tests do not scale well. Manual Testing is not consistent or repeatable. Lack of training. Testing is difficult ...
Divide and conquer was a strategy successfully employed by ancient Persian kings against their Greek enemies. It is a strategy that can still be used successfully today. Fundamentally, by dividing something into smaller more manageable pieces (in the case of the ancient Persians, they divided the Greek city states), it becomes much more manageable.
An automation framework is a way to organize your code in meaningful manner so that any person who is working with you can understand what each file contains. Automation frameworks differ based on how you organize your code – it can be organized based on your data, so that any person who wants to use ...
Picture a series of sprints: There are a variety of features being developed, with an eye towards having automated tests related to those features. Work starts to move along and Test Automation work likewise goes along with it. However, at some point, there invariably is that moment, usually in the middle of the project, where ...
Introduction Many executives have some very basic questions about Software Testing. These questions address the elements of quality (customer satisfaction) and money (spending the least amount of money to prevent future loss). The basic questions that executive have about Software Testing include: Why care about and spend money on testing? Why should testing be treated ...
What is Ethereum Smart Contract Testing? What are its challenges? If you’re new to Smart Contract Testing, this in-depth guide will prepare you on how to test smart contracts successfully. Blockchain stands out due to its enormous implications. Everyone has heard of it, but few people know what the ramifications are for testers or how ...
All too often, software development organizations look at automating software testing as a means of executing existing test cases faster. Very frequently there is no strategic or methodological underpinning to such an effort. The approach is one of running test cases faster is better, which will help to deliver software faster. Even in organizations that ...
Many organizations rely on HP Quality Center to design test plans and track test results. TestArchitect’s Quality Center integration makes working with QC as easy as pie. TestArchitect (TA) is a three-in-one tool for Test Management, Test Development, and Test Automation. Users can create and manage test assets, execute tests, track and analyze test results, ...
Elfriede Dustin of Innovative Defense Technology, is the author of various books including Automated Software Testing, Quality Web Systems, and her latest book Effective Software Testing. Dustin discusses her views on test design, scaling automation and the current state of test automation tools. LogiGear: With Test Design being an important ingredient to successful test automation, ...

Leave a Reply

Your email address will not be published.

Stay in the loop with the lastest
software testing news

Subscribe