When testing modules in isolation, Test::MockObject is your friend. Create an interface which wraps around the actual telnet session, then mock that interface for all things you expect (and don't expect) to happen.
Of course, at some point you are going to have to test against the actual device to make sure that e.g. it doesn't have a bug in its telnet implementation or terminal emulation and that it actually parses the commands the way you expect it to. But those can be run as part of the integration tests and don't need to be run continually while developing (even though its preferrable).
In reply to Re: TDD when some components talk to hardware?
by tirwhan
in thread TDD when some components talk to hardware?
by lwicks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |