Configuration model
The CANoe configuration brings together networks, databases, simulation behavior, measurement, and test execution. Its purpose is to make the same engineering assumptions explicit each time a test runs.
Testing, Validation & Simulation
A practical engineering model for configuring Vector CANoe, simulating missing network nodes, executing repeatable tests, and analyzing timing and diagnostic behavior.
Engineering model
CANoe test automation connects a network model, the behavior under test, executable test procedures, and result evaluation. The configuration defines how CAN and CAN-FD communication is represented, CAPL supplies event-driven behavior where needed, and the test specification defines expected outcomes. Reliable automation depends on controlling setup, timing, message and signal interpretation, simulation scope, and the boundary between functional testing, integration testing, and regression testing.
Core concepts
The CANoe configuration brings together networks, databases, simulation behavior, measurement, and test execution. Its purpose is to make the same engineering assumptions explicit each time a test runs.
CAPL nodes, test modules, and libraries implement stimulus, supervision, and evaluation logic. They control how the automation reacts to network events and timing conditions.
CAN and CAN-FD define the communication behavior that the test observes or simulates, including message timing, payload interpretation, and the relationship between messages and signals.
UDS testing requires the automation to send diagnostic requests, observe responses, and evaluate the resulting behavior against the test specification without assuming undocumented ECU behavior.
A test suite turns defined procedures and expected results into repeatable execution and evaluation, making regression testing less dependent on manual observation.
Start by separating what is being stimulated, what is being simulated, and what constitutes a pass or failure.
A CANoe test generally has four logical parts: the configured communication environment, the behavior under test, the executable procedure, and the evaluation criteria. The environment may contain real communication, simulated nodes, or both. The procedure applies stimulus in a defined order, while evaluation checks observed messages, signals, diagnostic behavior, and timing against the test specification.
| Part | Primary responsibility | Typical engineering question |
|---|---|---|
| Configuration | Defines networks, databases, simulation, and test assets | Is the test environment representing the intended communication? |
| Stimulus | Produces the inputs required by the procedure | What message, signal, or diagnostic interaction starts the scenario? |
| Observation | Collects behavior relevant to the expected result | Which message, signal, response, or timing condition is evidence? |
| Evaluation | Applies assertions and acceptance criteria | What exact observation distinguishes pass, failure, and incomplete execution? |
Configuration quality determines whether an automated failure represents the system or only an incomplete test environment.
Identify the configured networks, existing CAPL nodes, test modules, libraries, and available project assets before adding new behavior.
Check that the relevant CAN or CAN-FD messages and signals are represented consistently with the DBC and the intended test scenario.
Decide which missing network nodes must be represented by a restbus simulation and which behavior is supplied by the target ECU or other connected elements.
Associate the test specification with executable setup, stimulus, observation, and evaluation logic so that the procedure can run without undocumented manual actions.
Run the smallest meaningful scenario first and inspect whether setup, communication, timing, and evaluation occur in the intended order.
CAPL is most useful when event-driven network behavior, timing supervision, or reusable test logic must be made executable.
A CAPL script can implement network simulation, stimulus generation, event handling, and test-related evaluation. The script should make state transitions and timing assumptions visible: identify what starts a step, what observation ends it, what timeout applies, and what condition records a failure. Reusable libraries can reduce duplication, but they should not hide the acceptance criteria that explain why a test passes or fails.
A good automated test turns the test specification into a sequence of controlled actions and unambiguous observations.
Specify the required communication and configuration conditions before stimulus is applied. If the state cannot be established automatically, identify that limitation explicitly.
Send or change the input required by the test case, using the network or diagnostic interaction defined by the specification.
Monitor the relevant message, signal, response, or timing behavior instead of inferring success from the stimulus itself.
Compare the observation with the expected result and distinguish a failed assertion from a timeout or unavailable test prerequisite.
Return the environment to a known condition where practical, or ensure that the next test does not inherit unexamined state from the previous one.
The smallest useful test is not necessarily the shortest test. It is the smallest test whose setup, stimulus, observation, and evaluation provide enough evidence for the stated expected result. Splitting unrelated expectations into separate tests usually makes regression failures easier to localize.
Many automation failures are timing-model failures rather than functional failures, so timing must be treated as test data.
| Behavior | What to inspect | Reasoning |
|---|---|---|
| Message period | Intervals between relevant messages | A message can be present but still violate the expected periodic behavior. |
| Response latency | Time from stimulus to observed response | The response may be correct but outside the acceptance condition. |
| Ordering | Sequence of related messages or signals | An expected set of messages in the wrong order can indicate a different state transition. |
| Timeout | Maximum wait for an expected observation | A timeout should identify the missing observation without assuming why it is missing. |
| Bus representation | CAN or CAN-FD configuration and decoded content | A mismatch in network representation can create misleading timing or payload results. |
Use timing measurements consistently across the test suite. Avoid arbitrary delays as substitutes for event-based synchronization when the expected behavior is defined by a message, signal, or diagnostic response. When a timing issue appears, separate scheduling, communication, decoding, and target behavior hypotheses before changing thresholds.
Restbus simulation allows testing to proceed when an ECU or complete vehicle is unavailable, but it must represent only the behavior required by the scenario.
A restbus simulation supplies communication from missing network nodes so that the behavior under test can interact with a defined network environment. The simulation should identify which messages and signals it produces, when it produces them, and which state changes cause those outputs. Unnecessary simulation can conceal integration defects by making the environment more cooperative than the real system.
UDS automation requires precise request and response handling while avoiding assumptions about ECU behavior that are not in the test specification.
For a UDS test, define the diagnostic interaction as an observable exchange: establish the required initial condition, issue the specified request, observe the response, and evaluate the expected result. The test should make transport and timing assumptions visible where they affect the procedure, but it should not infer undocumented service behavior from a single response.
State the communication and ECU condition required before the request is sent.
Use the request defined by the test specification and preserve the sequence required by that procedure.
Check the response content and timing that the specification identifies as relevant.
Record the observed result and distinguish an unexpected response, timeout, and unavailable prerequisite rather than collapsing them into one failure.
Engineering pitfalls
A fixed delay can hide variable response timing and make tests slow or flaky. Prefer synchronization on the relevant observed behavior, with an explicit timeout and a defined evaluation condition.
Seeing a message does not prove that its signal values, period, ordering, or triggering condition are correct. Evaluate the properties required by the test specification.
A previous test can leave simulated nodes, signals, or diagnostic conditions changed. Establish a known precondition or isolate the test so that execution order does not determine the result.
Simulating more behavior than the scenario needs can mask integration problems. Keep the simulated network boundary explicit and limited to the required evidence.
Widening timing or value tolerances without understanding the observation can convert a real defect into a pass. First determine whether the issue is in configuration, decoding, timing, stimulus, or target behavior.
A UDS response or timeout is evidence about the observed interaction, not automatic proof of root cause. Compare it with setup, network observations, and the test specification.
FAQ
Engineering support
Need help structuring a CANoe configuration, CAPL automation, or repeatable test suite around your existing project and test specification?