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.
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.