Automatic test case generation in TPT

Automatic test case generation can ease the testing and optimize the test coverage with minimal effort.
With TPT, test cases can be generated in different ways. The methods range from simple combinatorics
to sophisticated approaches to fulfill the aim of structural coverage of test objects.

TPT uses the following elements to generate test data:


Simulink, TargetLink, C-code

Equivalence classes

Measurement data

Value ranges

Variants

Dasboard recording

Generating test cases for Simulink models, TargetLink models, and C-Code (TASMO)

To generate test data from MATLAB Simulink models or dSPACE TargetLink models,
PikeTec developed the tool "TASMO for Simulink".

To generate test data from C-code, "TASMO for C" has been developed by PikeTec.
TASMO stands for "Testing via Automated Search for Models".

TASMO by PikeTec generates test data by analyzing Simulink models, TargetLink models, and C-code. It finds the smallest amount of test cases to achieve the most comprehensive structural coverage (Condition Coverage, Decision Coverage) for
the model or C-code. TASMO uses a unique combination of static analysis and evolutionary algorithms to fulfill its task.

Due to efficient methods, TASMO can even generate test cases for the coverage of complex models. TASMO supports
all commonly known block types, systems with feedback, Stateflow models, structured signals, and many more.

Among other things, the test cases generated by TASMO can be used to run back-to-back tests
and regression tests to meet the requirements of safety standards like ISO 26262.


  • TASMO for C: Specification of the input signals and selection of the appropriate transition types
  • TASMO for Simulink: Selection of coverage goals, filter subsystems, and activation or deactivation of individual conditions.
  • TASMO for Simulink: test data generation

Generating test cases from equivalence classes

TPT supports the definition of equivalence classes sets consisting of several equivalence classes. Based on the selected equivalence classes from one or several sets, the test cases are generated automatically. This is done by combination of automatically determined or user-specified representatives of the equivalence classes that are used as input signals to the system to be tested. The structure and the range of the coverage of equivalence classes is easy to configure.

Moreover, TPT enables you to check and document automatically the coverage of the equivalence classes.


  • An equivalence class with and one without a representative
  • Select the equivalence classes that should be used to automatically generate test cases.
  • Set additional options that control the creation of variants.
  • Result of an automatically generated test case from equivalence classes.

Generating test cases by combining variants of states, paths, and transitions

A TPT model consists of a so-called automaton that contains states variants and transition condition variants. In general, test cases are built upon combinations of different variants in TPT. These combinations can be manually specified by the user or they can be automatically generated by TPT. To automatically generate the combinations, the user needs to select the states, transitions, and path variants of an automaton that should be used for the test case generation.


  • Test case generation by combining variants

Generating test cases based on value ranges

TPT can generate test cases that contain all permutations of values for output channels.
The values can be derived from a mapping. You can select the signals that should be used for the test case
generation, and change the minimum and maximum values and also a quantization for each signal manually.


  • Value ranges from a mapping can be changed manually .
  • Generated step list.

Generating test cases from measurement data

TPT enables you to import more than one measurement file at once. For each file, a test case will be generated.
TPT can look automatically for appropriate measurement files in your file system according to the search criteria you set. Signals of a measurement file can be assigned to TPT-signals for the stimulation of the system to be tested. In case the measurement file contains also output signals, you can use them to generate back-to-back test or regression tests.
The following file formats are supported: *.csv, *.dat, *.mat, *.mf4, *.mdf, *.tptbin, and *.xls.


  • Generate test cases from test data

Generating test cases from Dashboard recordings

The Dashboard in TPT is a freely configurable, graphical user interface that is used to interact manually with the system to
be tested. Besides observing the system’s visual feedback, you can manually stimulate the system. These interactions can
be recorded during the test and are saved as human-readable test cases that can be altered afterwards.


  • Use a Dashboard recording as step list
  • A step list based on a Dashboard recording

Follow us