[Catalyst] writing a test suite for my app
Matt S Trout
dbix-class at trout.me.uk
Thu May 11 23:18:55 CEST 2006
Daniel McBrearty wrote:
> OK, I suck at writing tests. I admit it. I have no clue as to how to do
> it "the perl way", whatever that is, apart from running "make test" when
> installing a module. I have some module tests for one of my libraries
> using Test::Simple, and a hand written script to glue them all together.
> I've just been looking at Test::Inline and it looks cool, but I can't
> quite work out if it will fit for this catalyst app.
> But I need to already start writing tests for my one controller before
> shit starts getting out of hand ...
> So how do I start? What's the first step? (I need to be able to
> manipulate stuff in the session as well.)
(1) anything you create using myapp_create.pl will get a test stub
created for you :)
(2) look at Catalyst::Test and Test::WWW::Mechanize::Catalyst
(3) Test::More and Test::MockObject are your friend for unit testing
Go have a play with that lot and shout if you have any more questions :)
More information about the Catalyst