What is hardware-in-the-loop testing?
The green checkmark that lied
Picture the best kind of release day. The test suite is green, every check passed, the pipeline did its work, and the firmware ships with a clear conscience. Then the board in a customer's home disagrees. It boots wrong, or wakes wrong, or does the one thing the tests all said it would never do.
Nobody made a careless mistake. Everything the tests proved was true. It was just proven on a computer, about a simulation of the chip, and the chip itself was never asked. That gap, between what passed on the PC and what happens on the silicon, is where a whole category of field failures lives. Hardware-in-the-loop testing exists to close it.
The simulation gap, in plain words
Most automated firmware testing works like this: the parts of the firmware that can run anywhere, the parsing, the decisions, the logic, are compiled for an ordinary computer and exercised there. It is fast, it is thorough, and it catches a great deal. Every serious firmware team does it.
But the real product is not a computer program. It is a chip with its own clock, its own radio, its own bootloader waiting underneath the firmware, and its own opinions about timing and power. Host tests cannot hear those opinions. A driver that behaves perfectly against a simulated peripheral can still meet a real peripheral that answers a fraction slower than expected. An update that installs cleanly in theory still has to survive a real bootloader, on a real board, in someone's hallway.
So the question every release quietly carries is: did anyone actually run this on the board? Hardware-in-the-loop is how that question stops depending on anyone's memory.
A board that never leaves the desk
The setup is almost disappointingly simple to describe. One real board, the same board the product ships on, stays permanently plugged into a test machine in the lab. It is not borrowed for demos and it is not unplugged when someone needs a spare. It has one job.
Every time the code changes, the pipeline finishes its normal work, builds the firmware, tests what can be tested on the host, signs the result, and then sends that exact signed firmware to the waiting board. The machine flashes it, the board boots it, and then the machine questions it over its serial line. Did you boot? What version are you running? Do you answer when spoken to? Does the headline feature, the thing this product exists to do, actually respond?
If the board answers everything, the release carries a kind of evidence no simulation can offer. If it does not, the pipeline goes red in the lab, in minutes, instead of a customer finding out in a month. This is not exotic lab practice, either. Nordic Semiconductor's own open Asset Tracker project, real firmware the company maintains in public, runs on-target tests in its continuous integration. Vendor-grade teams work this way because the alternative is finding out from the field.
What good looks like
A healthy setup has a few unglamorous habits. There is one board and one queue: changes line up and take their turn with the hardware rather than fighting over it, because hardware cannot be in two builds at once. The board's verdict is reported in the same place as every other test result, so a red board reads as a red test, not as a rumour from the lab bench. And the rig is maintained like the product depends on it, because it does.
That last habit carries the honest part. A hardware rig can fail for boring physical reasons: a tired cable, a connector working loose, a board that had a bad day. A rig that cries wolf teaches the whole team to ignore it, and an ignored rig is worse than none, so flaky behaviour gets treated as a bug in the rig and fixed, never waved away as noise. The standard is strict precisely because the prize is trust: when this setup says the board is happy, people believe it.
The question changes
Without hardware in the loop, "did it work on the board?" is a question about people. Who checked, on which board, running which build, and did they write it down? The answers age badly and argue poorly.
With it, the question answers itself. The board checks itself, on every change, and keeps the receipts: which firmware, which version, which answers it gave. Releases stop resting on someone remembering to do the manual thing on the busiest day of the month. And the engineer reading the report is no longer trusting a simulation's opinion about hardware. They are reading the hardware's own testimony.
That is the whole idea: the pipeline's ground truth is a real board, answering real questions, every single time.
Where it is taught properly
Hardware-in-the-loop is the capstone of Embedded DevOps, Engineered, our project course that builds a full firmware pipeline around a real Zigbee product. It is on sale now on the course page, and the first chapter is free to read before you decide.
One email when a new Guide or course lands. Nothing else.

