Condition based test

from Wikipedia, the free encyclopedia

The state-based test (also state-based test, testing of state machines) describes a test method in which tests are derived from a specification in the form of a state machine . This is a dynamic, functional test procedure from the group of black box tests .

application

The state-related test is used when, in addition to the input values, the previous sequence of a system has an influence on the system behavior. The test object can be a complete system with different states but also a class with different states in an object-oriented system.

State diagram

The test object can be modeled in the form of a state diagram . Proceeding from a starting state, the test object can assume different states. Changes in status can be triggered by events or fulfilled conditions.

Test criteria

There are a number of test strategies for testing state machines. In general, the aim is to cover all states and all state transitions. This means that test cases are generated that aim to run through all states and state transitions at least once. Testing all events is also considered useful. Analogous to the branch coverage test, however, the coverage of all state transitions does not represent a complete test. It should also be noted that, according to Balzert, there is still no reliable statement about when a state machine is sufficiently tested.

method

To determine the test cases, a transition tree / transition tree is created from the cyclic state diagram. The following procedure is possible:

  • the initial state forms the root of the tree
  • for each possible transition, the transition tree is branched to a new node that represents the next state
  • this step is repeated until
    • an already visited state is reached ( round-way trip ), or
    • a state has no outgoing transitions.

Paths can now be determined in this tree according to the criteria. Each path corresponds to a test case.

Tools

See also

literature

  • Balzert, Helmut: Textbook of software technology: software management, software quality assurance, corporate modeling , Berlin: Spektrum Akad. Verl., 1998, ISBN 3-8274-0065-1
  • Spillner, Andreas: Basic knowledge of software testing: training and further education to become a Certified Tester , Heidelberg: dpunkt-Verl., 2003
  • Poser, Robert: Automated test plan creation for operating strategies of hybrid vehicles , Technische Universität Dresden, 11/2007

Individual evidence

  1. Spillner, Andreas: Basic knowledge software test: training and further education to become a certified tester , Heidelberg: dpunkt-Verl., 2003
  2. Balzert, Helmut: Textbook of Software Technology: Software Management, Software Quality Assurance, Enterprise Modeling, Berlin: Spectrum Akad. Verl., 1998, ISBN 3-8274-0065-1
  3. Poser, Robert: Automated test plan creation for operating strategies of hybrid vehicles , Technische Universität Dresden, 11/2007