The Curiosity Blog

Models in testing: Where’s their value?

Written by James Walker | 12 October 2020 11:29:58 Z

System models: there’s lots of different techniques today, but where is their true value for testers and developers? Here’s five ways that I’ve found modelling helps us deliver quality software in short iterations:

1. Models are a collaboration piece.

With visual models, BAs, developers and testers can all work in parallel from one agreed picture of a system. They can import requirements and test assets to maintain a single source of truth. This minimises uncertainty and miscommunication across the development lifecycle, while helping to avoid the majority of bugs rooted in the design phase.

 2. Models can automate arduous testing activity.

This replaces repetitive test case design, complex test scripting, and test data provisioning for thousands of individual tests. Model-based test design instead auto-generates optimised test cases, scripts and data from central models:

Figure 1 – A simple example of using visual models to test a web UI. Test cases, scripts
and test data have all been found or created for the login screen, generating three tests to
test the modelled logic.

These activities are some of the most time- and skill-intensive in testing today, frequently responsible for pushing testing ever-further behind releases. The average QA team, for instance, spends 44% of their time waiting for, finding, or making test data. Meanwhile 46% cannot hit their desired automation rates as they “lack skilled and experienced test automation resources.”[1]

3. Models optimise testing based on time and risk.

The complexity of applications today means that there is more logic than could ever be tested in-sprint, even with test execution automation. Model-based test design can overcome this challenge without compromising on quality. It can optimise test creation to focus testing where it matters most. In Test Modeller, for instance, we optimise tests to “cover” all the modelled system logic in the smallest number of tests possible.

This increases the likelihood that we’ll find bugs before a release, protecting production and finding bugs where they cost far less time and effort to fix. This is particularly valuable given the speed of releases today, where we might only have days or weeks to find bugs before the next release.

4. Models automatically maintain test assets and enable greater foresight

As test scripts, data and test cases are all generated from models in Test Modeller, they update with them. Test maintenance then becomes as simple as updating a visual flowchart, hitting “generate” to update automate test suites in Git repositories and beyond.

Formal modelling also enables dependency mapping, meaning that the impact of a change made in one place is detected across all of the modelled system. Faced with massively complex, sprawling systems, this allows system designers to forecast the complexity of a change before it’s made. Developers furthermore know exactly what needs updating across the system, while testers only test as much as needed to validate the change.

5. Models enable in-sprint testing and development

Instead of struggling with technical debt, miscommunication and overbearing manual tasks, models allow testers and developers to implement new functionality sprint-over-sprint. They can update existing system logic and assets only insofar as they’ve been impacted by the latest change, focusing instead on innovation.

This close collaboration, automation and optimisation further allows test teams to execute rigorous tests in-sprint. Faced with ever-more complex systems and rapid release cycles, they can identify exactly what needs testing, updating visual models to re-execute rigorous regression test suites in short iterations.

The value of modelling accordingly extends across software design, development and testing. It allows cross-functional teams to deliver accurately built, fully tested systems in-sprint. If you’d like to see these benefits and more in action, watch Jim and me In the beginning there was a model: Using requirements models to drive rigorous test automation.

Think there’s a major benefit of modelling missing from this list? Let me know in the comments below!

[1] Sogeti, Capgemini, Micro Focus, Word Quality Report 2019-20.