Testing C/C++ code
You can test C/C++ code via the TPT-internal virtual machine or by using the TPT-internal co-simulation platform FUSION.
The test environment that is needed to connect the C-code with TPT can be generated automatically by TPT.
You can use multidimensional arrays, maps, curves, and structured data types in your test settings.
Function calls and function stubs are also supported by TPT.
You can even debug your C-code during testing.
Tools like GCC, Visual Studio, BCC, or LLVM can be used to compile the executable.
Testing C and C++ via TPT's virtual machine
Using the EXE platform, you can test C and C++ code. You only need to connect the input and output signals of the system under test (SUT), the parameters, and the functions with the variables you have specified in TPT. After that, you create the test frame / test driver with your preferred compiler (for example GCC, Visual Compiler). You can always manually adapt the test frame as well as the test driver. Code coverage can be measured and shown with tools like CTC++ or Gcov.
You can also use the C platform to test your C-code. This has the advantage that you can manage your C-code files and functions, and trigger the code instrumentation and the compilation of the test frame directly in TPT.
This platform also allows you to generate automatically test data with "TASMO for C" by PikeTec.
Testing and verifying ASCET models with TPT
You can test and verify ASCET models with TPT as physical Model-in-the-Loop (MIL) or as quantized implemented Software-in-the-Loop (SIL). You can also test individual modules or whole module groups in the form of an integration test.
TPT is compatible with all ASCET6.x versions.
TPT can control all aspects of the test execution. Thus, TPT starts the appropriate ASCET version and loads the project and experiment necessary for testing. The test run is fully-automatic including the code generation and the compilation either directly as C-code or in an ASCET-specific test environment, that is in an ASCET experiment. Afterwards, the test results are automatically assessed based on the recorded data and presented in a report. Complex tests or test suites can be executed unattended in batch mode.
Workflow of testing ASCET models with TPT
A project in ASCET consists of software modules and tasks with processes.
You can test a single module or a complete module group (integration test) from an ASCET project.
You only need to select an ASCET project and tasks in the TPT platform configuration.
TPT has two platforms to run tests on ASCET modules: the ASCET platform and the ASCET@FUSION platform.
By using the ASCET platform in TPT, tests on modules with their tasks are run directly on ASCET.
By using the ASCET@FUSION platform, you can reschedule processes directly in TPT and the tests are executed much faster.
No matter which of the two platforms you use, the analysis of the interfaces of the system to be tested is based on A2L/DCM information from the ASCET project. The default values are imported from DCM files to be used for the default implementation configuration. The assignment of interface values as inputs or outputs of the model and the local measurement values are determined through an analysis of the model. The test environment is automatically generated
as a new ASCET project in TPT, consisting of the original model, the TPT test driver, and the associated tasks.
Besides functional requirements-based testing, TPT supports regression/back-to-back testing.
Using TPT assesslets, the results of the test run can be evaluated.
Advantages of testing ASCET models with TPT
10 good reasons why you should test your ASCET models with TPT.
- Compatible with all 6.x-ASCET versions
- Development-related testing during the modeling with ASCET
- Testing of preconfigured ASCET projects that contain a single or several modules
- Automatic interface analysis of ASCET models
- Automatic testframe generation
- Testing of unscaled physical models and also of scaled implementation models
- Regression tests with unscaled and scaled simulations
- Meaningful and freely configurable test documentation
- Linking and tracing of requirements and test cases
- Testing according the safety standard ISO 26262
Testing and verifying AUTOSAR components
With TPT, you can test atomic AUTOSAR software components or compositions of multiple AUTOSAR components without the need for further tools. TPT connects to the AUTOSAR software components to be tested and generates an appropriate test frame based on the content of the ARXML file.
Client/Server ports, sender/receiver ports, Per-Instance-Memory (PIM), Inter-Runnable-Variables (IRV),
Mode-Declaration-Groups, Exclusive Areas, and CalPrm ports are supported by TPT.
Copyright © www.piketec.com All rights reserved