ISTQB CT-AuT study materials
ISTQB CT-AuT study resources

ISTQB CT-AuT: Testing in Virtual Environments (Including XiL)

ISTQB CT-AuT · Work through your exam, one topic at a time.

All guide sections

Testing in Virtual Environments (Including XiL)

What the exam tests

Virtual testing and XiL: you must distinguish MiL, SiL, PiL, HiL, and ViL, explain what each can and cannot validate, and choose an appropriate level for a given test objective.

Core rules

  • XiL is an umbrella term for “X-in-the-loop.” The X is the test object: model, software, processor, hardware, or vehicle.
  • MiL tests models with a plant model; no target code is involved. SiL tests production code on a host or virtual ECU. PiL runs code on the target processor. HiL connects real ECU hardware to a real-time plant simulation. ViL tests a vehicle or vehicle subsystem in a virtual or augmented environment.
  • Higher fidelity is not automatically better. MiL and SiL are cheap, repeatable, and good for early fault injection; they depend on model validity. HiL adds real-time behavior and electrical interfaces; it depends on the quality of the plant model and restbus simulation. ViL adds vehicle-level interactions but is complex and costly.
  • Back-to-back testing compares results across XiL levels to detect model, code, or hardware mismatches.

Worked example

A lane-keeping assist algorithm must be tested before the ECU hardware exists. The control algorithm is a Simulink model, and production C code will follow. Use MiL for early algorithm and requirements tests. When code is generated, use SiL to check code behavior and run back-to-back against MiL. When the ECU is available, use HiL with a camera sensor model and restbus simulation to test real-time behavior and bus interaction. ViL is justified later for vehicle-level scenarios. Choosing HiL first would delay testing and add no value for algorithm defects, because the defect exists in the model long before the hardware is available.

Traps

  • Claiming HiL eliminates the need for MiL and SiL.
  • Forgetting that SiL does not guarantee real-time behavior.
  • Treating a plant model as ground truth without validating it.
  • Confusing PiL (target processor) with HiL (full ECU hardware).