I can tell you how they do it on Flight Simulators
First, you're only going to get half the answer if you ask this question to only programmers so you should probably cross post this on http://electronics.stackexchange.com while you're at it.
I haven't done any work with robots but I did spend 5 years doing hardware on flight simulators so I can tell you how their architecture works.
The hardware layer is dumb
It contains a basic interface where you can adjust simple input/output values and set interpolation breakpoints for analog signals. When you're working with 'fresh' hardware, everything will work as expected with little or no calibration but over time the parts will undergo mechanical wear and need to be adjusted.
The calibration is a simple table that contains sectioned ranged between the min/max values. To measure input on these, a servo is typically used (ex a linear potentiometer, transducer, accelerometers, etc). Or in the case of instrumentation, you just judge accuracy visually and adjust until calibrated.
The software layer is the opposite
Everything is complex and interconnected so it's important to isolate some variables to test the functionality. There's no need to give yourself a headache thinking up scenarios because it's much easier to run some realistic scenarios where you can collect data. When you run the tests, you're basically measuring the stored data against the current output.
On a flight simulator this is referred to as a QTG (Qualification Test Guide). At its core it plots the data on a 2D grid where one dimension is time and the other is the output.
Believe it or not, that's the essence of how they develop the models. A real plane is equipped with a ton of sensors and flown around doing controlled scenarios. Because all of the controls can be driven without human interaction, the tests are run (ie the sim flies itself) by the computer and the data is compared.
Even though robotics are created on a much different scale the principles are the same. The traditional approach is to completely sever the hardware and software layers so both can be tested individually. Hardware input is collected through servos, and set through an independent interface. Sofware input can be set/read by independently measuring and comparing the signaling that would otherwise go to the hardware and plotting it against known 'good' data.
The tests themselves don't necessarily need to be complex as long as the results are predictable, measurable, and reproducible.