3 ms·
> however for general programming purpose this would be fairly accurate and cut down your software development time drastically. Having written drivers for tha
by antoinealb 9y ago
> however for general programming purpose this would be fairly accurate and cut down your software development time drastically.
Having written drivers for that kind of sensors I would rather use automated tests (unit & integration). Maybe you could explain why your approach is better than just using mocks ?
- aagosh 9y agoSure, One immediate benefit I could see is the independence of hardware board (even those without any controller). You could run and schedule automated test on VM, without instrumenting your code. This is more relevant for System tests and integration. Also since we emulate transactions at bus layer, it works more accurate rather than software tests. We recently found a bug in a driver where it had a hardcoded time to wait for response, instead of waiting for interrupt status. Such a thing would work in real hardware but fails on our simulated tests. Last but not least, sensor manufacturer could provide more accurate models of device behavior through our software which could then be tested against compensation values applied in your driver.