We do a lot of automated testing as we develop our hardware and software. Here's a picture of the current hardware test harness connected to a rev 2.0 Raspberry Pi.
The Interface board and Port Expander tests involve connection GPIO pins in pairs, and then checking that changing outputs are seen at the appropriate inputs. The analogue loop-back test (not shown in this image) is a little more complex; we'll cover that in a future post.
The screenshot below shows all the tests passing. As you can see, we're using py.test to run them. They are all in our quick2wire-python-api library on github, in the test directory.