LWN.net Logo

A Test::MockObject Illustrated Example

O'Reilly's perl.com features an article that shows how to perform unit testing on object-orient code with Test::MockObject. "People like to find excuses to avoid writing tests for their code. One of the most common goes something like, "It's not feasible to test this, because it relies on external objects" - CGI code, code using the Apache request object, TCP/IP servers, and so on. The Test::MockObject module makes it much easier to isolate code that uses such objects."
(Log in to post comments)

Copyright © 2002, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds