How would you divide embedded tests among host execution, simulation and physical hardware?
Answer
Run deterministic algorithms and error handling on the host with controlled dependencies; use native simulation or emulation for operating-system services, drivers and integration paths; reserve boards for electrical behaviour, peripherals, timing, power and assumptions the model cannot reproduce. Keep a traceable hardware smoke set and compare simulator limitations against escaped defects.
Strong answer includes
- places checks at the lowest credible layer
- states what simulation cannot prove
- keeps a small repeatable real-hardware gate
Practical example
A device driver for a new I2C sensor passes 200 host-level unit tests against a mocked bus, but the team also runs a five-minute hardware smoke test on the actual board before every merge. That smoke test catches a case where the real sensor needs an extra 2ms settling delay after power-up that the mock never modeled, saving a field escape.