Automated model-based testing of control software with TPT
PikeTec GmbH Dr. Eckard Bringmann Motivation
Testing control systems requires special features .
2008, PikeTec Embedded World 2008 Folie 2 What makes automotive testing special?
Feature 1: Tests must be portable and reusable between the integration levels and technologies.
Modeling Coding / Target MC ECU Car Code Generation Integration Integration Integration
Functional refinement
Objective: Test refinement, instead of test rewriting !
2008, PikeTec Embedded World 2008 Folie 3 What makes automotive testing special? System under Test Feature 2: Tests must handle signals , parameters , and diagnosis in a simple way.
Data tables, recorded data, parameter sets Stimulation Test Case Behavior
2008, PikeTec Embedded World 2008 Folie 4 What makes automotive testing special? System under Test Feature 2:3: Tests Testsmust mustbe able handle to react signalsto system, behaviorparameters online, and( closed-loop diagnosis testsin ). a simple way.
Observations DataExpressive tables, “closed-loop” recorded data, test parameter models sets Stimulation Test Case Behavior
2008, PikeTec Embedded World 2008 Folie 5 What makes automotive testing special? System under Test Feature 4: ECU Tests must be real-time enabled.
Real time! Observations
Stimulation Real time! Test Case Behavior
2008, PikeTec Embedded World 2008 Folie 6 What makes automotive testing special? System under Test ECU Feature 5: Test results should be evaluated automatically based on the requirements. Observations
Stimulation ? ? Test Case ? Behavior
2008, PikeTec Embedded World 2008 Folie 7 TPT
TPT is a test tool for testing control and feedback control systems
2008, PikeTec Embedded World 2008 Folie 8 How to test with TPT
?? ? ?
assessment test description results
Tester Test Test assessment Test modeling fully automated documentation
scenario data description logs
TPT Test Virtual Machine execution Platform adapter platform specific platform
2008, PikeTec Embedded World 2008 9 Test modeling
Modeling characteristics Graphical test modeling Based on automata (hybrid, hierarchical, parallel) Supports modeling of signal data Unique approach to integrate all test cases into a single test model Clear structured, compact test models Independent of the test platform
2008, PikeTec Embedded World 2008 Folie 10 TPT Test Process
?? ? ?
assessment test description results
Tester Test Test assessment Test modeling fully automated documentation
scenario data description logs
TPT Test Virtual Machine execution Platform adapter platform specific platform
2008, PikeTec Embedded World 2008 11 Example 1: Transmission simulation environment
Automated test execution TPT VM is embedded into a dedicated module in the environment Communication with ECU code and environment (car model) is managed by the backbone Easy to integrate (less than one week) Test case Test result (byte code) (signal Simulation-Controller logging) (Start, Stop, Pause, Step, …)
Trans TPT VM Transmission Data Data UI Process- Controller Viewer Logger Platform Panel Model (C-Code) Adapter
Simulation Bus
2008, PikeTec Embedded World 2008 12 Example 2: Matlab/Simulink environment
Automated test execution TPT VM is embedded into a Simulink S-function Communication with ECU code and environment (car model) is managed by Simulink Interface is specified by a Interface Test cases Test result generated m-script (m-script) (byte code) (signal logging) Test cases are hand over by means of workspace variables RTW and Targetlink enabled TPT VM
2008, PikeTec Embedded World 2008 13 Example 3: Module testing (‘C’ Code)
test frame = custom c code (SUT) + tpt-vm.dll + glue code
test frame runs the test cases using the TPT VM and records
Test cases Test result result signals to a file (byte code) (signal logging)
TPT VM
2008, PikeTec Embedded World 2008 14 TPT Test Process
?? ? ?
assessment test description results
Tester Test Test assessment Test modeling fully automated documentation
scenario data description logs
TPT Test Virtual Machine execution Platform adapter platform specific platform
2008, PikeTec Embedded World 2008 15 Test assessment
Logical assessment criteria + signal comparison
Online assessments integrated in automata Offline assessments using Extended Python Minimize online efforts Huge library, reference comparison, access to file system, external tools etc.
2008, PikeTec Embedded World 2008 16 Test documentation
Test documentation is generated automatically based on assessment results Reports may contain signals and variables customizable based on report templates
Template editor
example 1 example 2 2008, PikeTec Embedded World 2008 17 TPT Feature Summary
Features:
Platform independent test models Consistency from model to assessment and report Automated tests (from test execution to test report) Closed loop tests supported Abstract test language Systematic test case definition Intuitive graphical models Continuous behavior testing
2008, PikeTec Embedded World 2008 18 Visit our booth 10.0 - 516
2008, PikeTec Embedded World 2008 Folie 19