I've had a few less-than-successful experiences with Test::MockObject. The tests were hard to write and they didn't uncover real bugs because they just weren't that realistic.
I'd encourage you to build a test harness that runs a real web server talking to your real FCGI script. Then you can hit that real server (probably running on a high port) with Test::WWW::Mechanize. You can look at Apache::Test for inspiration or keep it simple. I've done this for web apps and for SMTP clients (using Net::SMTP::Server here). It's a pain to get the start/stop behavior right but once you do it's all downhill and your tests tend to find real bugs. And that's the whole point, isn't it?
-sam
| [reply] |
Take a look at what Catalyst does for testing.
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
| [reply] |
Try Selenium. There is a Perl client called WWW::Selenium, and a Firefox plugin called Selenium IDE.
--
No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]
| [reply] |