Interesting that nobody has mentioned yet how useful Expect can be as an automated testing tool- my first gig out of college was at Ericsson where we were developing at an edge router (the AXI-540) that was going to be competitive with Cisco (this was during the first dot-com). One of my first projects was using Expect to develop a series of smoketests - basically we'd connect two routers (pc1-rtr1-rtr2-pc2) and then use Expect to automatically configure RIP/OSPF/ISIS/etc. and then verify that the routes showed up, that you could ping from pc1 to pc2 using the new route, etc. Simple stuff like that but it gradually grew more comprehensive..
Expect made it really easy to automate this sort of testing - where the only way you can configure something is via the CLI and you want to be able to do this even when the only connection is via a serial console (for router reboots). We used to run it daily and as an engineer just out of school it was an eye-opening experience: because of the daily runs you got to see just how often people's commits could break simple functionality in other parts of the system.