Model-Based Testing
Introduction
AF3 integrates a model-based testing framework with the following features:
- Generate test suites from models with the given coverage criteria or input profiles
- Simulate the model by using a test case as input.
- Update the test suite if the model is changed.
Generate Test Suites
- Step 1 - Right click a component in the model navigator and select "Test Suite Specification"
- Step 2.1 - To generate for example random input, right click on the test suite specification and select the "Random Input Profile".
- Step 2.2 - Set the random parameters in the editor.
- Step 3 - Right click on the test suite specification and select "Generate Test Suite".
- Step 4 - The generated test suites will be listed under the component.
- Step 1 - Open a test suite and select a test case.
- Step 2 - Right click on the test case in the editor and select "Run Test Case Simulator".
- Step 3 - AF3 will switch to simulation perspective and the model and test case will be shown in the views.
- Step 4 - Click "Simulated Step" button in the simulation view to jump to the next step. The green arrow in the Test Case View marks the current position in the whole test case.
- Step 5 - If all test steps in the test case are simulated, the simulator will jump back to the first step.
Test statistics
For test suites of components with automaton specifications you can find statistical information on the states and transitions
visited
if you open the test suite and select the "Statistic" tab:
Update Test Suite
- Step 1 - Select a test suite in the model navigator.
- Step 2 - Right click on the test suite and select "Update Test Suite".
- Step 3 - A new test suite will be created by AF3 with the same inputs and re-computed outputs.