You are on page 1of 13

How to Actualize Quality

While Practicing Agile


Discover how Agile’s short dev cycles and flexible, quick response can help
improve the quality of your mobile apps

by Angie Jones
Testing mobile applications is difficult.

In addition to the features being delivered,


there are a vast array of other testing
considerations that need to be taken into
account, such as the diversity of devices,
versions of OS, latency, interruptions, network
switching, offline capability, user experience,
and many, many more.

With so much to test, mobile development teams struggle to do an adequate job of


covering all their bases. As teams consider adopting an Agile software development
methodology, a common fear is the possibility of falling even further behind on their
testing efforts. With the pressure of delivering a release to the market and ensuring
that the release’s quality has been verified, many mobile development teams question
if going Agile is the right move for them.

The reality is, Agile is the only way organizations can basically survive while competing
for better engagement, exposure and revenues, and pushing up aggressive release
schedules.

2
Why Go Agile?
The Agile software methodology is a set of methods and practices that encourage communication,
collaboration and cross-functional teamwork to enable short development iterations that allow for the
flexibility to respond quickly to changing demands. By developing and releasing within short cycles,
which are typically timeboxed as two-week sprints, teams can obtain fast feedback and adjust their future
deliveries accordingly.

Agile practices lend themselves very well to mobile app development. Frequent releases can help to keep
your audience engaged and improve user retention — an area that many mobile apps struggle with. Mobile
app users are also very vocal regarding their experiences with apps and are not shy about recommending
new features and enhancements. Incorporating this feedback into the planning of future releases is a great
way to improve customer satisfaction.

The software industry is competitive, especially on the mobile applications market. The faster you can get a
minimum viable product to market, the sooner you can grow your user base, credibility and revenue. These
are some of the key indicators that potential users and investors are looking for.

3
Lesson Learned: Doing Mobile Without Agile
Everpix, a photo organization mobile app startup, is a great case study on what can go wrong when
adopting a more traditional approach to software development when creating a mobile application.
Everpix released a beta version of their app, which is a good thing. However, the company spent the next
nine months working to perfect the app.

Once released, the app included several new features and its quality was undoubtedly a focus for the
company, as the work they produced was top-notch. However, the development pace was not ideal for a
company that needed to be focused on growing a user base.

During the time they were developing the app, Everpix spent all their investments on paying their
employees and other costs associated with maintaining the app. By the time they released, they were in
financial trouble. Without generating enough revenue to cover their expenses, the company eventually
folded.

What Everpix did right was focusing on developing a quality mobile application. However, it was not done
rapidly enough to survive in the fast-paced mobile industry. Subscribing to the Agile methodology would
have enabled the company to release high-quality features in a timely fashion.

4
Quality At Speed Is A Must
Fully embracing the Agile software development methodology can be a challenge for any team. It could be
especially challenging for a team that is developing mobile applications. Within an Agile sprint, the team
must not only develop new app features, but also ensure that the app is of high quality.

Testing the quality of mobile applications involves many different facets. It is unrealistic to expect
traditional testing techniques alone to be as effective to testing a mobile application within an Agile sprint.

Many teams have come to this conclusion the hard way. With what seems like not enough time to do
adequate testing, they forego a lot of it and release anyway. The issue here is that bugs will be found one
way or another — either by your testers or by your users. The bad news is that your users are not nearly as
forgiving as your testers. The app stores are littered with negative reviews from users complaining about
quality issues.

Given the limited amount of time in an Agile sprint and the abundance of testing that needs to be done to
deliver a high-quality app, you may easily find yourself wondering “How do we get this done?”

Here are four techniques to help you achieve your quality initiatives while working in an Agile process.

5
1. SHIFT LEFT TESTING
The term “shift left” means to move testing efforts from the end of the development cycle to much
earlier stages. A common misconception is that this only applies to the test engineers as part of concrete
teams. “Shift left” does not just mean that testers get more technical; it also means that developers
need to focus more on quality.

2. UNIT TESTS
No matter what software methodology you subscribe to, unit testing should be the norm for software
developers. Unit tests individually validate the smallest units of an application and every testable unit
should have one.
Furthermore, these tests should be automated and executed as part of your code integration strategy.
Also, because they are automated, they can be run easier against your lab of devices to provide a sanity
check. For this reason, unit tests are key to the successful testing strategy for mobile apps. These tests
should make up most of the automated test suite.

6
3. ALLOW TESTERS TO DRIVE DEVELOPMENT
Another approach to improve quality is to use Test-Driven Development (TDD) as a means of specification.
TDD is the process of developing your tests before writing the production code. It encourages developers
to ponder the problems that they are trying to solve and only write enough code to solve them. This
prevents developers from overdesigning a solution and adding more code than necessary.
While it may seem that this process would lengthen the development phase, in most cases it shortens
it because significantly less production code is written, and less debugging is required. Thus, TDD
contributes significantly to higher quality and more frequent releases, reduced support efforts, and
better potential for further evolution of any app.

4. EXECUTING HAPPY PATHS


Another technique developers can use to shift testing left is to execute the non-automated “happy path”
flows against the set of environments that are supported by the application. A happy path is a basic,
straightforward scenario that does not anticipate any abnormal behavior or actions by the end user or
the device. Ensuring that these work across all the environments is a requirement that development can
satisfy.
As Agile is an all-hands-on-deck sport, these are just a few ways that developers can pitch in to help
shift testing left. In doing so, this frees up the testers to focus on other critical areas that need their
attention.

7
Explore Mobility While Testing Features
Besides what is executed by development, there are a lot of other scenarios that still need to be tested.
These include less common, but still probable, paths that many end users will follow — the ones that
exercise the mobility of the application. There are so many of these to cover. To hit two birds with one stone,
you could put them right into your feature testing.

For example, when testing an in-app purchase feature, what happens if in the middle of a transaction, an
incoming phone call or a text message is received? How does the app behave? Is the purchase compromised
and therefore revenue lost?

Another example would be testing an upload or download feature. Try switching the network from cellular to
Wi-Fi in the middle of the process. How does the app behave? Does the process continue after the network
switch or is it discontinued?

If you are testing an app where your changes must be reflected on a server, try starting a scenario online,
continuing the process while offline, and then going back online again. Is all data synched up as expected?

When dealing with mobile environments, these are the types of occurrences that are bound to happen, yet
end users are oblivious to their impact and still expect apps to operate properly. Anything short of that will
be a perceived as lack of quality.

8
Automate the Regression Tests
As your team develops new features, there will be plenty to test without worrying about retesting existing
features. Simply put, there is never enough time to perform regression testing and verify the quality of
new features at the same time without significant compromises in either direction. Therefore, you need a
pragmatic approach toward automation activities. You must strive to automate important tests that provide
lots of value and build a stable and reliable regression test suite step-by-step. This will offload you and your
team when it comes to repetitive testing of vital scenarios.

This automated suite can be run unattended, so no human intervention will be necessary. Hence, it will
detect and warn for regressions as often as desired. Of course, executions will be done against the diverse
set of device types and operating systems needed for full coverage.

Adding test automation may seem like yet another activity that will consume a lot of development time,
but if you implement it strategically, it does not have to. Adopting practices such as Behavior-Driven
Development (BDD) — a collaborative process that promotes specification of the desired behavior of the
potential feature — can not only ensure that the business analyst, developer, and tester are all on the
same page before development begins, it can also serve as an executable document to drive automation
efforts. Using this approach can greatly increase the quality of the application, since everyone agrees on
what should be built and how it should behave. As a bonus, automated steps can be written to validate the
scenarios.

9
Another approach to speeding up your automation efforts is by using the app’s web services for as much
of the scenario as possible. For example, let us assume that we are testing an e-commerce mobile app and
we would like to automate the “increase quantity” feature of the shopping cart. Every step before an item
actually gets inside the cart is necessary, yet irrelevant to the testing of this specific feature. These types
of steps should be done in the most cost-efficient way possible — and most times that is via web services.

To best accomplish this Agile-friendly approach toward automation development, a sophisticated


framework is needed that will support the implementation of BDD with interface and web services testing.

Example of a BDD Scenario Automating “Increase Quantity” in e-Commerce App

10
The intent of this scenario is to test the “increase quantity” functionality of the shopping cart, so we will
use web services to add the product to the cart since that is not the functionality under test, as illustrated
by the following code snippet.

Line 39 Calls a Web Service to Add a Product to the Cart

11
Now that the product is already in the cart, we can automate against the app’s user interface to test the
aforementioned functionality. Go through the test code in Figure 104 and get to know how UI testing
could be elegantly plugged into such “hybrid” BDD scenarios.

An Example of UI Testing as Part of a “Hybrid” BDD Scenario Relying Also on API Calls

12
Summary
There is a lot of ground to cover when testing mobile applications. While it may seem daunting to achieve
this while practicing Agile, the collaboration and cross-functional aspects of this methodology are perfect
for bringing in and evolving sustainable quality applications within short periods. Keep in mind that
aggressive release schedules require constant focus on continuous improvement, so ideally your Agile
practices will evolve, mature, and then mutate again with the same fast pace.
This content is excerpted from The Digital Quality Handbook – A guide for achieving continuous quality in a DevOps reality, published by Perfecto.
Get the book

Angie Jones
is a Senior Automation Engineer at Twitter who has developed automation strategies and frameworks for countless software
products. As a Master Inventor, she is known for her innovative and out-of-the-box thinking style which has resulted in
25 patented inventions in the US and China. Angie shares her wealth of knowledge by speaking and teaching at software
conferences all over the world and leading tech workshops for young girls through TechGirlz and Black Girls Code. You can
read more on her site at angiejones.tech

About Perfecto Learn more about testing in an Agile


Perfecto enables exceptional digital experiences. We help you transform your business and strengthen every
digital interaction with a quality–first approach to creating web and native apps, through a cloud–based environment:
test environment called the Continuous Quality Lab™. The CQ Lab is comprised of real devices and real
end–user conditions, giving you the truest test environment available.
From the blog: The 3 Big C's of Agile
More than 1,500 customers, including 50% of the Fortune 500 across the banking, insurance, retail, Development and Testing
telecommunications and media industries rely on Perfecto to deliver optimal mobile app functionality
and end user experiences, ensuring their brand’s reputation, establishing loyal customers, and continually
attracting new users. For more information about Perfecto, visit perfecto.io, join our community follow us On-demand webinar: 4 Keys to DevOps
on Twitter at @PerfectoMobile. Efficiency

eBook: Master Your Shift-Left Moves

You might also like