Generating test cases automatically 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 methods to fulfill the aim of structural coverage of test objects.

Test data generation from Simulink models and TargetLink models

Test data generation from equivalence classes

Test cases based on measurement data

Test data generation from value ranges

Test case generation by combining state variants, transition variants, and paths

Test data generation from Dasboard recordings

Generating test cases for Simulink models and TargetLink models (TASMO)

TASMO by PikeTec generates test data by analyzing Simulink models and TargetLink models. It finds the smallest amount of test cases to achieve the most comprehensive structural coverage (Condition Coverage, Decision Coverage) for the model possible. 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.

  • Specify the input signals and choose the appropriate transition types to achieve the best results.
  • Select coverage goals, filter subsystems, and activate or deactivate individual conditions.
  • You can pause or stop the test data generation at any time, and use the already generated test data in your project.

Generating test cases from equivalence classes

TPT supports the definition of equivalence classes sets consisting of several equivalence classes. Based upon 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.

  • Up to TPT9, equivalence classes are defined inside the Mapping Editor.
  • With TPT10, you can set equivalence class sets directly in the Declaration Editor. You can also set a representative to a specific equivalence class of the set.
  • 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 variants of its states and transition conditions. Furthermore, test cases can be modeled by choosing different paths in the respective TPT-automaton. In general, in TPT test cases are built upon combinations of different variants. These test cases can be specified manually by the user and can also be generated automatically according to configurable settings. In the settings, the user chooses the state, transition, and path variants of an automaton that should be used for the test case generation.

  • Select the state and transition variants of the test automaton that should be used for the automatic test generation by simply check them.
  • The result of the test case generation can be quite extensive depending on your automaton and the selected 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 directly generate back-to-back/regression tests.
The following file formats are supported: *.csv, *.dat, *.mat, *.mf4, *.mdf, *.tptbin, and *.xls.

  • The dialog for generating test cases from test data is activated under "Tools".
  • For the test data import, you can set further import preferences and specifications.
  • From the chosen test data state variants of the type test step list and test cases are generated.

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.

  • Activate the recording function to record the user actions via the Dashboard with the system under test.
  • You can insert the Dashboard recordings easily as test step list. Automatically a test case will be created.
  • You can adjust the steps based on the Dashboard recording.

Follow us