Testing

Tired of Waiting For QA? Embrace Continuous Testing

Automating late-stage tests -- such as performance and mobile testing -- early in the development pipeline gets rid of long waits and efficiently reduces release timelines.

Nobody likes waiting. It is something we all try to avoid and it is surely one of the principal reasons developers hate testing. Whether it's writing scripts to automate unit tests, or waiting for QA clearance, testing holds back releases and the opportunity to build fun new things. In some organizations, this delay has led to a genuine dislike and distrust of the people and teams that cause the waiting…the testers.

Continuous testing brings developers and testers closer together with process and technologies that result in better products that ultimately make end users wait less. Eliminating end-user wait is the most important goal of all for developers.

Continuous Integration (CI), as Kohsuke Kawaguchi, the architect of the most popular CI server, Jenkins, once told me, is fundamentally about continuous, complete, automated testing. Much of the development world considers running unit tests and other code build tasks as the primary role of CI. However, as the lines between traditional QA and development continue to blur, the types of tests that CI runs have become more sophisticated, extending now to load testing and to functional testing of mobile apps on real devices. In this article, I examine how these latter forms of testing can be done with CI and how a model of continuous testing enables compression of the software development pipeline.

Performance Testing: Pursuing the End of "Wait"

Running performance testing early (that is, as soon as code is relatively stable) is a novel concept to many. However, development managers are beginning to realize the value of having developers run small load tests as early as possible. These component-level load tests can identify scalability issues and help developers tune front-end performance, isolate memory leaks, and eliminate simple performance killers early in the development cycle. Additionally, when these tests are launched with CI and run as part of automated regression testing, development managers can begin tracking performance trends very early  a cutting-edge advantage that IT organizations are only beginning to appreciate.

Figure 1 shows the results of performance tests when automated as part of a Jenkins-driven build.

Figure 1: Performance trending in Jenkins.

In pursuing the benefits of early automation of performance testing, you might encounter these obstacles:

Getting developers to care, and write more tests: Performance testing has traditionally been an elite art, and it still is. To get it done right, developers will want to engage performance engineering experts on your team, or work with a third party, to choose a suitable load testing tool and help define simple, effective load tests. The by-product of this effort is that much of the low-level testing that consumes performance experts will now be covered earlier by tests run by developers. This frees up performance experts to run more complex, end-to-end performance engineering and production tuning.

Setting up a test system to handle load: Most early-stage development takes place on a developer's desktop. At this phase, performance tests should be small and limited. But as soon as builds can be run on a larger system, a team member should be assigned to assure the same configuration and scale of system is provided for the entire team. Big or small, the system should be consistent in order to provide a good baseline for tests. The cloud is a great choice for test systems. In fact, more and more companies are defining a task in their CI system to provision a test environment in a cloud, run a set of automated load tests, report the results, and then tear down the test environment.

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task.
However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Video

This month's Dr. Dobb's Journal

This month,
Dr. Dobb's Journal is devoted to mobile programming. We introduce you to Apple's new Swift programming language, discuss the perils of being the third-most-popular mobile platform, revisit SQLite on Android
, and much more!