This repository contains a highly scalable, database-agnostic test automation framework written in CAPL. It is designed to validate Rx (Receive) communication across automotive networks, primarily supporting CAN and FlexRay protocols.
By decoupling the core test logic from project-specific database files (DBC, ARXML), these generic functions can be universally applied to any automotive project. Testers simply write lightweight test cases that pass their domain-specific signals and system variables into these robust generic functions.
Only for learning purpose
The current release focuses on comprehensive validation of incoming (Rx) messages and signals from other ECUs. The generic functions support the following scenarios:
- ⏱️ Timeout Validation: Verifies that expected cyclic messages are received within their specified timing thresholds.
- 🛡️ E2E (End-to-End) Protection Check: Validates safety-critical communication by verifying the CRC (Cyclic Redundancy Check) and SQC (Sequence Counter / Alive Counter).
- 📏 DLC (Data Length Code) Validation: Ensures received frames match the expected byte length defined in the network database.
⚠️ Signal Fault Testing: Injects and validates network-level signal faults and invalid values.- 📊 Signal Range Validation: Dynamically checks if received signal values fall within expected Min/Max boundaries (incorporating epsilon handling for floating-point accuracy).
The framework relies on a master-slave architecture between your Test Cases and the Generic Functions.
- Databases: Attach your project-specific
.dbcor.arxmlto your CANoe simulation. - Includes: Include the generic CAPL script (
.cinor.can) in your vTESTstudio or CANoe Test Module. - Test Execution: Write test cases that pass native database references (Signals, System Variables) into the generic functions.
// Inside your project-specific Test Case
testcase TC01_EngineSpeed_RangeCheck()
{
long inputs[3] = {0, 3000, 8000};
float expected[3] = {0.0, 3000.0, 8000.0};
// Calling the generic function using ARXML/DBC definitions
Check_signal_value_float_type("EngineSpeed", sysvar::RTE::EngineSpeed, inputs, expected);
}- Vector CANoe (Version 11.0 or higher recommended)
- Properly configured Network Node or Test Setup block.
- Relevant Network Databases (
.dbc,.arxml, or.fibex).
The next major iterations of this framework will expand diagnostic capabilities and introduce robust support for Tx (Transmit) message manipulation:
- Fault Testing Phases: Validation of DTCs (Diagnostic Trouble Codes) and signals before the fault, during the active fault, and after the fault is healed.
- Generic functions for Tx signal stimulation.
- Dynamic manipulation of Tx E2E profiles (corrupting CRC/SQC for negative testing).
- Tx physical value mapping and scaling verification.
- Automated Tx timing and jitter analysis.
This project is licensed under the MIT License.