Back to blog

Requirements traceability for HIL test programs, from requirement to test result

Simulation

11 / 29 / 2026

Requirements traceability for HIL test programs, from requirement to test result

Key Takeaways

  • Requirements traceability links every requirement to the HIL tests that verify it and the results those tests produced.
  • A traceability matrix generated from tools and automated runs stays current, while one maintained by hand drifts quietly.
  • Automated, traceable HIL runs are what make continuous verification credible to a safety assessor.

Requirements traceability turns a HIL test program into evidence by linking every requirement to the automated test that verifies it and the result that test produced, so an audit becomes a report you can generate instead of a scramble you dread.

The cost of losing that link grows with every stage a defect survives. A requirements error costs 21 to 78 times more to fix when it’s discovered during integration and test than when it’s caught during requirements, according to a NASA study of project life cycle costs, which is exactly the stage where HIL programs spend most of their time.

HIL is where requirements meet real controllers, real I/O and real timing. When the trace from requirement to result is current, HIL findings flow straight back to the requirement they affect. When it’s stale, the same findings arrive as surprises nobody can place.

What requirements traceability means for a HIL test program

Requirements traceability for a HIL program means every requirement has a documented link to the test cases that verify it, and every test result links back to the requirement and the software version it covered. The trace runs in both directions, so you can start from a requirement or from a failed test.

Consider a battery management requirement that overcurrent protection must open contactors within 10 milliseconds. Traceability links that requirement to the HIL scripts that inject overcurrent at different states of charge, to the pass criteria in each script and to the result of every run on every firmware build. When the requirement changes to 8 milliseconds, the trace shows instantly which tests need updating.

Why safety standards require traceability from requirement to result

Safety standards such as ISO 26262, IEC 61508 and DO-178C require traceability because an assessor has to see that every safety requirement was implemented and verified, and that nothing untested reached the product. Without the trace, test results are just numbers without a claim to support.

The standards differ in detail but agree on the principle. Requirements must trace to design, design to code and requirements to verification, with each link reviewed and kept under configuration control.

That last condition is where HIL programs often stumble. A test run on firmware version 4.2 doesn’t prove anything about version 4.3 unless the trace records which version ran and the tests are repeated after the change. Assessors check this link specifically, so a gap here can hold up a release even when every test has passed at some point.

“Coverage gaps show up as empty cells.”

How to build a traceability matrix for embedded testing

A traceability matrix for embedded testing lists each requirement with its identifier, the test cases that verify it, the test level where each runs and the latest result for each software version. It’s the single view an engineer or assessor uses to confirm coverage and spot gaps.

The matrix works best when it’s generated automatically and nobody has to maintain it by hand. Requirements live in a management tool, test cases live in a test automation framework, and results come from automated runs, so the matrix is assembled from those sources whenever someone asks for it instead of copied into a spreadsheet.

Engineers usually start with a small set of columns and add more only when an assessor asks.

Matrix field What it records Why it matters
Requirement identifier The unique ID from the requirements management tool Links stay stable even when requirement wording changes
Test case identifier The automated script or procedure that verifies the requirement Shows exactly how each requirement is checked
Test level Model, software or hardware in the loop stage where the test runs Confirms each requirement is verified at the right V-model level
Software version The build that was tested in each run Proves the evidence matches the code that will ship
Latest result Pass or fail with a link to logs and recorded signals Lets anyone check the evidence behind a status

Coverage gaps show up as empty cells. A requirement with no linked test, or a test whose last run predates the current software version, is visible at a glance.

How each requirement links to an automated HIL test

Loop diagram from requirement ID to HIL test script to result and software version and back to the requirements tool.

Each requirement links to an automated HIL test through an identifier stored in the test script and reported with its result. When the script runs, the automation framework records the requirement ID, the software version, the test outcome and the measured signals, then pushes them back to the requirements tool.

HIL makes that automation practical because tests run unattended. Engineers working with OPAL-RT simulators often schedule full regression suites overnight, with every script reporting results against requirement IDs through APIs, so the trace updates without anyone retyping a result.

The recorded signals matter as much as the verdict. An assessor reviewing a protection requirement wants to see the current waveform and the contactor command alongside the pass flag. Signals also make failed tests faster to diagnose, because the engineer can see where the controller’s response departed from the expected profile without rerunning the scenario.

Where traceability breaks when requirements keep moving

Traceability breaks when requirements, tests or software change faster than the links between them are updated. A trace that was complete at the last milestone quietly becomes wrong, and nobody notices until an audit or a field issue forces a close look.

The same few failure patterns appear in most programs.

  • Requirements edited without flagging the tests linked to them
  • Test scripts copied for a new variant without updating their requirement IDs
  • Results recorded manually and detached from the software version
  • Derived requirements that never received tests of their own
  • Closed defects that left no regression test behind them

Each of these adds to the rework that follows a late discovery. Accumulated software technical debt in the United States has grown to roughly \$1.52 trillion, and broken traceability is one of the quietest ways embedded teams add to it.

How continuous verification keeps the trace current

Continuous verification keeps the trace current by rerunning linked tests automatically whenever a requirement, model or software build changes. Every run refreshes the result against the requirement, so the matrix always reflects the code that exists today.

Keeping requirements, design and traceability current is the first principle of the Agile-V approach described in Power in Mind Volume 12. It works because automation does the bookkeeping that engineers under schedule pressure can’t sustain by hand. A change to a single requirement triggers only the tests linked to it, so the feedback arrives in hours, and the full suite still runs on a schedule to catch side effects nobody predicted.

“Each of these adds to the rework that follows a late discovery.”

What traceable HIL evidence means to a safety assessor

Traceable HIL evidence shows a safety assessor that every requirement was verified on the real controller, with the shipping software, against recorded results that anyone can inspect. That turns an audit from a hunt for documents into a review of a system that already holds the answers.

We see assessments move faster when teams can open the matrix, pick any requirement and walk straight to the signals that prove it. With OPAL-RT real-time simulation running those tests unattended, continuous verification becomes evidence an assessor can trust instead of a claim they have to take on faith.