Mobile Testing Tutorial PDF
Mobile Testing Tutorial PDF
This tutorial also provides a deep insight on mobile device automation testing. Using this
tutorial, you can enable yourself for up-to-date test planning for mobile device and mobile
device application testing. In addition, you shall be able to automate basic test scripts for
mobile device application testing.
Audience
If you are a quality assurance engineer having interest in mobile device testing as well as
mobile device application testing, this tutorial will turn out to be a helping guide.
Prerequisites
A reader should know basic software testing concepts such as test planning, black-box
testing tricks, etc. In addition, it will help a great deal if the reader is familiar with any
scripting languages, for example, JavaScript.
All the contents and graphics published in this e-book are the property of Tutorials Point
(I) Pvt. Ltd. The user of this e-book can download, read, print, or keep it for his/her
personal use. However, it is strictly prohibited to reuse, retain, print, copy, distribute, or
republish whole or the part of this e-book in any manner for the commercial purpose
without written consent of the publisher.
We strive to produce and update the contents and tutorials of our website accurately and
precisely, however, the contents may contain some inaccuracies or errors. Tutorials Point
(I) Pvt. Ltd. takes no guarantee regarding the accuracy, timeliness, or completeness of
our website or its contents including this tutorial. If you find any errors on our website or
in this tutorial, please notify us at contact@tutorialspoint.com.
1
Mobile Testing
Table of Contents
About the Tutorial ................................................................................................................................... 1
Audience ................................................................................................................................................. 1
Prerequisites ........................................................................................................................................... 1
2
Mobile Testing
3
Mobile Testing
Drawbacks of Selendroid....................................................................................................................... 54
4
Mobile Testing
5
1. Mobile Testing – Overview Mobile Testing
Before we start the actual tutorial, let’s have some fun. Take a look at the following list.
You can easily relate to these essential chores that we invariably have to face in today’s
busy and hectic lifestyle:
Now answer yourself. What do you need to perform these activities in a fraction of second?
The answer would be:
A smartphone,
Internet connectivity, and
A mobile app to do the job.
This makes us realize the importance of a mobile app in today’s era. Everything is being
done in a smart way through your smart phone. Each day, we get to know about a new
app or tool being launched to ease our life.
There is one well-known incidence about Gowalla. Millions of people enjoyed this location-
based social network that started in 2007 and shuttered down five years later. Multiple
problems blocked Gowalla from reaching mass appeal. One of the prime reasons that
surfaced was “Checking in was not that user friendly”.
To have a successful mobile app, we need to understand that developing a nice mobile
app is not the only requirement. A mobile app needs to be tested thoroughly in order to
get the likability of users. After all, it is the user experience makes any software successful.
6
2. Mobile Platforms Mobile Testing
Before jumping on to mobile testing, it's advisable to understand the basics of mobile
platforms. It mainly includes the operating system of the mobile, type of the device, and
type of the mobile app. Having sufficient knowledge about each of these will help us
conduct robust test planning in the long run.
Symbian
Symbian Low Discontinued
Foundation
Based on some generic survey, the usage of different operating systems in the market can
be depicted as shown below.
7
3. Mobile Device Types Mobile Testing
Mobile devices are typically handheld computers. They have many variants based on their
characteristics such as physical dimension, hardware and software capability, what are
they meant for, etc.
Take a look at the following table. It differentiates tablets, e-book readers, and
smartphones based on their characteristics.
8
4. Native vs Hybrid vs MobileWeb Mobile Testing
A critical factor that you have to consider while doing test planning is checking the Mobile
Application type. You will mainly come across three types of mobile applications: Mobile
Web, Native App, and Hybrid App. The classification is based on the development efforts
and App redistribution strategy. Let's understand each of them in detail.
Mobile Web
Web apps are not real applications; they are actually websites that open in your
smartphone with the help of a web browser. Mobile websites have the broadest audience
of all the primary types of applications.
Example: http://www.tutorialspoint.com/
Benefits :
o Easy access.
o Easy update: Just update in one location and all the users automatically have
access to the latest version of the site.
Downside :
o Mobile websites cannot use some of the features. For example, access to the
file system and local resources isn’t available in websites.
o Users won’t have the app’s icon on their home screen as a constant reminder.
The website needs to be opened in a web browser only.
o While native and hybrid apps appear on the App Store and Google Play, web
apps won’t. So redistribution is not that sensible.
9
Mobile Testing
Native App
A native app is developed specifically for one platform. It can be installed through an
application store (such as Google Play Store or Apple’s App Store)
Benefits :
o Native Apps live on the device and are accessed through icons on the device
home screen.
o They can take full advantage of all the device features — they can use the
camera, the GPS, the accelerometer, the compass, the list of contacts, and
so on. They can also incorporate gestures (either standard operating-
system gestures or new, and app-defined gestures).
o Native apps can use the device’s notification system and can work offline.
o Native Apps maintain UI design of each operating system, thus they offer
the best user experience. For example, a Native App can have a left-aligned
header in Android and a center-aligned header in iOS.
Downside :
o High cost for building the app : Native apps developed for one platform will
not run on another platform. An App built for Android will not run on iOS.
We need to build a different App altogether for iOS. Because of this reason,
we need to maintain multiple versions of the App.
o Even though you might publish native Apps, you’ll want to keep the mobile
website well maintained, as mobile brings more traffic. So maintenance is
higher.
Hybrid App
Hybrid Apps are a way to expose content from existing websites in App format. They can
be well described as a mixture of Web App and Native App.
Benefits :
10
Mobile Testing
Downside :
o Graphics are less accustomed with the operating system as compared to Native
Apps.
11
5. Device vs Application Testing Mobile Testing
Device Testing
This type of testing is generally being done to ensure the quality of a mobile device. Testing
includes hardware and software testing for a mobile. We will discuss here the different
types of testing which are generally being carried out on a mobile devices.
Unit Testing
Unit testing is a test phase when portions of a mobile device development are tested,
usually by the developer. It may contain hardware testing, software testing, and
mechanical testing.
Factory Testing
Factory testing is a kind of sanity check on mobile devices. It is conducted automatically
to verify that there are no defects brought by the manufacturing or assembling. It mainly
includes the following testing:
Certification Testing
Certification testing is the check before a mobile device goes to the market.
Application Testing
Mobile application testing is a process by which application a software developed for
handheld mobile devices is tested for its functionality, usability, and consistency. There
are different types of testing which can be performed on a mobile device. For example,
Functional Testing
Laboratory Testing
Performance Testing
Memory Leakage Testing
Interrupt Testing
12
Mobile Testing
Usability testing
Installation testing
Certification Testing
Security Testing
Key Points
Device testing is generally being carried out to check the mobile device itself,
whereas Mobile application testing involves testing of an application which will be
running on the chosen device.
When we call it device testing, hardware testing becomes a part of it. In case of
mobile application testing, it depends, i.e., if the application under test requires
hardware integration, then hardware testing will be involved.
Automation is possible for Mobile Device testing as well as for Mobile application
testing.
13
6. Mobile Emulator vs Simulator Mobile Testing
One thing is self-explanatory in case of mobile testing. To perform mobile testing, you
need a mobile device. This is to access that how our product will work and look like on a
given mobile set.
Suppose we are developing an application for flight ticket booking system. Once the
product is entirely developed, as a part of mobile testing, we need to check if the
application is working as expected with all the majorly used devices like Android phones,
iOS, Blackberry phones, and other different types of tablets and iPads.
To do this kind of check, we need to acquire each such device and then we can check if
the application behaves as per expectation. Yes you thought right, as a product owner one
will defiantly find this very expensive to procure such a large number of mobile devices
and carry out testing. So is there any smart alternate available?
The solution to this problem is to use Mobile Simulators and Mobile Emulators. These are
primarily software programs designed to provide simulation for important features of a
smartphone. They are very similar in nature, so sometimes, they are used
interchangeably.
14
Mobile Testing
Let us now understand more about mobile simulators and mobile emulators. There are
specific differences between the two. The following table lists the major difference between
a simulator and an emulator.
Emulator Simulator
So, what is the best choice for mobile testing? Best practice indicates that, while actual
development is in progress, we should use an emulator or a simulator. Before finalizing
the product, there should be a sanity check with chosen real devices. For example, there
is a huge number of Android smartphone users, so the smart choice is to have a sanity
check for the latest Android device and regression can be conducted over simulators.
15
7. Mobile Application Testing Mobile Testing
A simple definition of mobile application testing would go like this “Mobile application
testing is a process by which an application software developed for handheld mobile
devices is tested for its functionality, usability, and consistency. Mobile application testing
can be automated or manual type of testing.”
Note: For better understanding, we shall assume that we are testing a mobile application
for online flight ticket booking system.
Functional Testing
Functional testing is the most basic test for any application to ensure that it is working as
per the defined requirements. Similar to other user-interface based applications, mobile
applications require a number of human interactions in user scenarios.
Verify that past dates are not included in the search results.
Compatibility Testing
Compatibility testing has got the highest stack when it comes to mobile application testing.
The purpose of a mobile app compatibility test, in general, is to ensure an app’s key
functions behave as expected on a specific device. The compatibility itself should only take
a few minutes, and can be planned well in advance.
It is not going to be an easy task, deciding on which mobile devices compatibility tests
should be performed (as testing with all available devices is merely impossible). So
prepare a test matrix with every possible combination and get it prioritized by the client.
Localization Testing
Nowadays, most of the apps are designed for global use and it is very important to care
about regional trails like languages, time zones, etc. It’s important to validate the app’s
functionality when someone changes the time zone. It has to be taken into consideration
that sometimes western designs may not work with the audience from eastern countries
or vice-versa.
16
Mobile Testing
Verify that there is no UI or data truncation issue when we use the mobile app with
different languages (or say, non-English language).
Verify that time zone changes are handled gracefully for your mobile application.
Laboratory Testing
Laboratory testing, usually carried out by network carriers, is done by simulating the
complete wireless network. This test is performed to find out any glitches when a mobile
application uses voice and/or data connection to perform some functions.
Verify that there is no glitch while a customer is having voice chat with the support
staff.
Performance Testing
Mobile performance test covers client application performance, server performance, and
network performance. It is important to make sure that the performance test scenarios
cover all those areas. With the help of performance testing tools, it is not difficult to identify
the existing networks, servers, and server-side application bottlenecks, given the
predefined loads and transaction mix.
Verify that flight available check takes only a reasonable amount of time.
Verify that while flight availability is being checked, the mobile operates normally
and does not hang.
Stress Testing
Stress testing is a must to find exceptions, hangs, and deadlocks that may go unnoticed
during functional and user interface testing. Here is a list of some of the criteria for stress
testing:
Load your application with as much data as possible to try to reach its breaking
point.
Perform the repeated operations at varying speeds – very quickly or very slowly.
Leave your application running for a long period of time, both interacting with the
device and just letting it sit idle, or performing some automatic task that takes a
long time, for example, a slideshow.
17
Mobile Testing
Have multiple applications running on your device so that you can switch between
your application and other device applications often.
Check 1000 users are accessing the mobile app to search for domestic flights.
Check 1000 users are accessing the mobile app to search for international flights.
Security Testing
Vulnerabilities to hacking, authentication, and authorization policies, data security, session
management and other security standards should be verified as a part of mobile app
security testing. Applications should encrypt user name and passwords when
authenticating the user over a network.
One way to test security related scenarios is to route your mobile’s data through a proxy
server like OWASP Zed Attack Proxy and look for vulnerabilities.
Verify that the application does not get operated with same user credentials on two
different mobile devices.
Verify that a session automatically gets expired if it remains inactive for more than
15 minutes.
Memory testing is exceptionally important for mobile applications to ensure that each
application maintains optimized memory usage throughout the user journey. It is
recommended that we conduct memory testing on the actual target device, since the
system architecture is different from an emulator to an actual device.
Do flight availability checks ten times and note down increasing memory usage for
each check.
Keep the application running for ten minutes and observe if memory usage remains
stable.
18
Mobile Testing
required to measure the state of the battery at each activity level. It will give us a better
understanding of power consumption by an individual application.
Power Consumption test can be done manually; also there are some free tools available
in the market such as Trepn Profiler, Power Tutor, and Nokia Energy Profiler. These are
applications which can display the real-time power consumption on a smartphone or
tablet.
Use the mobile app to search for flight availability, and check the power
consumption remains minimal.
Keep the mobile app in ideal condition; verify that there is no power consumption
when there is no activity happening for the app.
Interrupt Testing
An application, while functioning, may face several interruptions like incoming calls or
network coverage outage and recovery. This can again be distinguished for:
Verify that flight availability check gets paused and resumed back after receiving
an incoming call.
Verify that the user can reject a call while using the App and again resume the
same App thereafter.
Usability Testing
Usability testing evaluates the application based on the following three criteria for the
target audience:
Efficiency: The accuracy and completeness with which specified users can achieve
specified goals in a particular environment.
Satisfaction: The comfort and acceptability of the work system to its users and
other people affected by its use.
19
Mobile Testing
It is very important to get usability testing in place from the early stage of the application
design, and it should not be done only when the application is completed. Usability testing
requires heavy involvement of users, and the output might affect the application design,
which is very difficult to change in the later stages of the project.
Installation Testing
Installation testing verifies that the installation process goes smoothly without the user
having to face any difficulty.
Verify that the installation process is smooth and does not take long.
Verify that the installation is successful through enterprise app store.
Uninstallation Testing
The basics of uninstallation testing can be summarized in one line as “Uninstallation should
sweep out data related to the App in just one go”.
Verify that all the application related files are removed successfully after
uninstallation.
If it is an App which stores media files (like Whatsapp or Facebook), retain the files
even after the uninstallation of the App.
Updates Testing
We need to be very much cautious about mobile app updates. People frequently complain
about applications not working satisfactorily after an update. So it is very important that
under the update testing, we qualify that the App will work as it was working previously.
In a nutshell, it should not break anything. Mobile application updates can take place in
two ways – Automatic update and Manual update.
20
Mobile Testing
21