Model-based testing

Model-based testing (MBT ) is an umbrella term for the use of models to

  • Automate activities
  • Generation of test artifacts in the test process.

This includes in particular falls the generation of test cases from models (eg using UML), which describe the desired behavior of the system under test.

Objectives and Benefits

Main goal is to not only automate the execution of tests (see test automation ), but already their creation to (partially). This is expected to transparency and controllability in the test case creation, making the test process more efficient and the quality test can be made more independent people.

Model Categories for MBT

When the MBT software to be tested or their environment (eg in the form of user profiles ) or just the test itself is represented as behavioral and / or structural model. [ Roßner 2010] therefore differs between

  • System models
  • Environment models
  • Test models

In MBT use.

System models describe software requirements for the system and can be in the form of analysis and design models. They focus I.A. not the test and therefore include, in particular, no test data (in the sense of a random sample from all possible input data into the system). Consequently, a generation on such models lead to a maximum of abstract test cases (ie, without providing values ​​for testing data).

Test models can arise from existing system models, but offer more options for the test. They describe the testing of a system and make test decisions that may have only likes " in the head" a tester explicitly from. So not only sequences of test steps, but test data, test steps and possibly test oracles can be modeled in them. As a result, it is possible to generate not just abstract, but concrete, and even complete and executable test cases from them. Used in test models, a keyword-based notation for test steps (see keyword-driven testing), even automated executable test cases can arise.

Test models put forward but with the testers knowledge in the creation of models. This skill requirement can be crucial for the success of MBT introduction.

MBT forms

Depending on which model categories are used and what role models play in model-based testing process, one can speak of various forms and degrees of maturity of MBT. [ Roßner 2010] defines the following:

  • In model-based testing models serve as a guide and basis for test design without necessarily generators have to be used. Since models compared to natural language requirements specifications can provide significant quality advantages, benefits the test quality already here.
  • Model -driven testing refers to the use of generators to test artifacts, especially test cases to generate from models. Frequently, these are but a one-way tool - way street, in the example the test results are not transmitted back to the model.
  • Are all relevant test information maintained in a model form and the tools to form a ring connected, one can speak of modellzentrischem testing.

MBT tools

Depending on which models should be based on the test generation and how far the generation should span, the use of commercial generators or in-house development of a generator is provided. An overview of commercial MBT tools can be found in [ Goetz 2009]. In it one finds the following taxonomy for MBT tools:

  • Model-based test data generators are tools that generate based on a model of the input and output data of the test object and certain tax information test data for the creation of abstract and / or concrete test cases. (Example: CTE, see classification tree method )
  • Model-based test case editors are tools that generate based on an abstract model of test cases concrete representations of the test case using the manual procedure or test scripts for automated testing.
  • Model-based test case generators are tools that several ( logically related ) generate based on a model of the system behavior, the system environment or the test and certain tax information test cases or test scripts automatically configurable coverage criteria.

A different and more complex taxonomy can be found in [ Utting 2007].

In general it will be necessary to be able to control the test coverage while generating process. Typically, here are the known from the White- box testing method based graph- cover extent of use (see control flow -oriented test procedure), but there are also other coverage strategies are conceivable (eg due to risk information in the model ).

Before generating it is I.A. essential, not only to test the generator, but supply the models to be processed appropriate quality assurance measures. These include, for example, Reviews, tool-based checks against meta-models or model checking.

A tool which the description of a model whose graph is made possible as flowcharts to implementation and execution of test cases Spec Explorer from Microsoft, which is offered as a free add-on for Visual Studio.

In the field of model-based results analysis ( " test oracle " ) has proved the rule-based approach with the RapidRep Test Suite.

577704
de