Hacker News new | ask | show | jobs
by FirmwareBurner 848 days ago
Why do you need the actual production machine for unit tests? Why can't you build a SW simulator for them and run unit tests on them?

I used to work in automotive and all unit tests didn't require the finished car, just the SW.

Nasa doesn't hava another Voyager probe in their lab floating around in zero gravity to run unit tests on before sending the SW patches, they use simulators.

For calibration you do need the final production HW, but unit tests shouldn't, so maybe there's a confusion here about the type of tests ran.

3 comments

> Nasa doesn't hava another Voyager probe in their lab floating around in zero gravity to run unit tests on before sending the SW patches, they use simulators.

JPL keeps a working duplicate of their Mars rovers on Earth and tests software updates there. So if the Voyager zero-gee environment prevents a useful duplicate, that means testing software in simulation is considered inferior to using a (massively expensive) physical duplicate like for the Mars robers.

https://mars.nasa.gov/news/8749/nasa-readies-perseverance-ma...

to do finite element analysis on the (nanometer) scale of processes/manufacturing they do - heh.
You're close. Asml doesn't test on one machine only.
Why do you need machines for unit test? Unit test just test code logic.
I don't work on the machines but I can provide you an example on why this wouldn't even work for simple machines like CNC machines. You could tell the machine for instance to move the drill out of boundaries, too hard, run it into a wall... All things that you can't catch with a software only unit test because the machine you're sending commands to doesn't really have any idea what else is going on in the space within it. So you can give it commands which are fine software wise but once they reach the real world, they can break stuffm