Model Based Testing within an “Agile Testing” Culture

by August 15, 2017

Don’t let app defects go undetected

With more than half of defects stemming from poorly defined requirements, CA has supported model based testing using “active” flowchart modeling to eliminate ambiguous requirements and avoid miscommunication. This approach drives efficient and rigorous testing within the sprint – in true agile testing fashion. With that said, we’ve teamed up with testing consultant and champion of a “New Model for Testing”, Paul Gerrard, to bring you a series of videos not only exploring the many benefits of model based testing, but showing how you can get started with it, alongside the right tools and technologies.

The video series includes an introduction to model based testing, based on the premise that Testing is mostly a thinking activity. Suggesting that before we understand test modeling, we need to understand the underlying thought process of testing and modeling in general. To learn more about model based testing concepts, watch this “New Model for Testing” video.

When test teams understand the fundamental role that modeling plays in testing, they will appreciate the benefits it can bring. One key concept to digest is the distinction between the quality of the model and the quality of the knowledge of the user’s desired functionality. Even with unambiguous models, the quality of software still ultimately depends on what ‘goes in’. If incomplete or incorrect knowledge goes into the model, testing will suffer and software at variance with the user’s desired experience will come out.

The Agile Testing culture and the need for upfront thinking

To deliver a quality system faster, it is imperative to establish upfront what the desired functionality is, while gathering and addressing constant feedback loops throughout the SDLC. This requires the constant analysis of information from numerous sources, including user feedback, written requirements and change requests, as well as analysis of production sources such as system data to gain a better understanding of how software is actually being used.

One motivation for validating ideas earlier and more regularly is that it works to identify miscommunication before it creates time-consuming, costly rework. This approach reflects part of a general move towards “shift left” testing.

“Shift left” is about bringing thinking earlier into the development lifecycle. In other words, it is about thinking upfront, and involves a process of testers working earlier to challenge the sources of knowledge that inform both design and development. In this way, the likelihood that the design will faithfully reflect the user’s desired functionality is maximized.

Moving from models to Model Based Testing

Once the upfront thinking has been done, the validated idea is incorporated into the design and then into the code. Testing then validates the code, to make sure it reflects the design.

If test cases and automated tests are derived automatically from a model, testing becomes a direct comparison of the design and the code. If the model faithfully encapsulates the knowledge gathered in the process set out above, testing validates that software actually delivers on the desired functionality, avoiding the defects which creep in when poor quality requirements are manually translated into poor quality test cases.

Model based testing can further shorten testing time and so the feedback loop, as optimized test cases which cover the maximum amount of functionality specified in the design, can be automatically generated from the model itself. Test models help to select tests in a systematic way, meaning that the most functionality possible within a sprint can be tested, without wasting time on manual test design or maintenance.

Continuous Testing and Delivery

Even with upfront thinking and rigorous testing, there must be an efficient, largely automated pipeline in place to take an idea from design through to deployment and production. This is where Continuous Testing and Delivery comes in. When the primary goal of speeding up the deployment and implementation of software is achieved, and the most obvious outcome is a reduction in the time taken to move from idea to production. If this idea has further been successfully validated early, and has then been faithfully translated into tests, it stands to reason that valuable software will be delivered.

In other words, model based testing as an approach within the broader Continuous Testing and Delivery process can find a place in an agile testing culture, which produces quality software, faster – at the speed of agile.