Model-based Testing Website Links For
Testing
 

Information About

Model-based Testing




The model is usually an abstract, partial presentation of the system under test's desired behavior.
The test cases derived from this model are functional tests on the same level of abstraction
as the model. These test cases are collectively known as the Abstract Test Suite . The
abstract test suite cannot be directly executed against the system under test because it is on the wrong
level of abstraction. Therefore an Executable Test Suite must be derived from the abstract
test suite that can communicate with the system under test. This is done by mapping the abstract test cases to
concrete test cases suitable for execution.


There are many different ways to "derive" tests from a model. Because testing is usually experimental and based on heuristics, there is no one best way to do this. It is common to consolidate all test derivation related design decisions into a package that is often known as "test requirements", "test purpose" or even "use case". This package can contain e.g. information about the part of the model that should be the focus for testing, or about the conditions where it is correct to stop testing (test stopping criteria).

Because test suites are derived from models and not from source code, model-based testing
is usually seen as one form of Black-box Testing . In some aspects, this is not completely
accurate. Model-based testing can be combined with source-code level test coverage measurement, and functional models can be based on existing source code in the first place.

Model-based testing for complex software systems is still an evolving field.


MODELS

Especially in Model Driven Engineering or in OMG's Model-driven Architecture the model is built before or parallel to the
development process of the system under test. The model can also be constructed from the completed system.
Recently the model is created mostly manually, but there are also attempts to create the model automatically, for
instance out of the source code.
One important way to create new models is by model transformation, using languages like ATL , a QVT -like Domain Specific Language .


DERIVING TESTS ALGORITHMICALLY

The effectiveness of model-based testing is primarily due to the potential for automation
it offers. If the model is machine-readable and formal to the extent that it has a well-defined
behavioral interpretation, test cases can in principle be derived mechanically.

Often the model is translated to or interpreted as a Finite State Automaton or a State Transition System . This automaton represents the possible configurations of the system under test.
To find test cases, the automaton is searched for executable paths. A possible execution path can serve as a test case. This method works if the model is Deterministic or can be transformed into a deterministic one.

Depending on the complexity of the system under test and the corresponding model the number of paths can be very large,
because of the huge amount of possible configurations of the system. For finding appropriate test cases, i.e. paths that refer to a certain requirement to proof, the search of the paths has to be guided.
For the test case selection multiple techniques are applied.


Test Case Generation by Theorem Proving

Theorem proving has been originally used for automated proving of logical formulas. For model-based testing approaches
the system is modelled by a set of logical expressions ( Predicate s) specifying the system's behavior. For selecting test cases
the model is partitioned into Equivalence Classes over the valid interpretation of the set of the logical expressions describing the system under test. Each class is representing a certain system behavior and can therefore serve as a test case.

The simpliest partitioning is done by the disjunctive normal form approach. The logical expressions describing the system's behavior are transformed into the Disjunctive Normal Form .

The classification tree-method provides a more sophisticated hierarchical partitioning. Also partitioning heuristics are used supporting the partitioning algorithms, e.g. heuristics based on Boundary Value Analysis .


Test Case Generation by Constraint Logic Programming

Constraint Programming can be used to select test cases satisfying specific contraints by solving a set of contraints over a set of variables. The system is described by the means of contraints. Solving the set of constraints can be done by boolean
solvers (e.g. SAT-solvers based on the Boolean Satisfiability Problem ) or by Numerical Analysis , like the Gaussian Elimination .
A solution found by solving the set of constraints formulas can serve as an test cases for the corresponding system.


Test Case Generation by Model Checking

Originally model checking was developed as a technique to check if a property of a specification is valid in a model. We
provide a model of the system under test and a property we want to test to the model checker. Within the procedure of proofing
if this property is valid in the model the model checker detects witnesses and counterexamples. A witness is a path, where the
property is satisfied, a counterexample is a path in the execution of the model, where the property is violated.
This paths can again be used as test cases.


Test Case Generation by Symbolic Execution

Symbolic execution is often used in frameworks for model-based testing. It can be a means in searching for execution traces
in an abstract model. In principle the program execution is simulated using symbols for variables rather than actual values. Then the program can be executed in a symbolic way. Each execution path represents one possible program execution and can
be used as a test case. For that, the symbols have to instantiated by assigning values to the symbols.


EXTERNAL LINKS

  • http://www.model-based-testing.org is a website about model-based testing in general

  • http://www.goldpractices.com/practices/mbt/index.php gives a survey of applying model-based testing

  • http://www.mdqa.org/ (also http://www.modelbasedtesting.info/) is a website about model-based testing and, more broadly, model driven quality assurance

  • ;Tools:

  • Conformiq Test Generator is a model-based testing tool using UML state charts that represent testing strategies

  • Leirios Test Generator is a model-based testing tool that generates tests automatically from deterministic system specifications

  • Reactis Tester is another model-based testing tool that focuses on control systems

  • TGV is a tool for the generation of conformance test suites for protocols

  • TorX is also a prototype testing tool for conformance testing of reactive software

  • Lurette is an automated testing tool of reactive programs written in Lustre

  • AsmL Test Tool can generate tests directly from an AsmL model

  • AutoFocus (in german) is a graphical tool for developing and modeling distributed systems with integrated testing facilities



Related Concepts