If you look at Yapcom, I have been using
Test::WWW::Mechanize::CGI and
Test::WWW::Mechanize

see the get_mech mehtod in
http://svn1.hostlocal.com/yapcom/yapcom/trunk/t/lib/YAPC/Test.pm
and the use in these test:
http://svn1.hostlocal.com/yapcom/yapcom/trunk/t/web/

You to write a bunch of test with the standard Mechanize API and then run
them either using Test::WWW::Mechanize::CGI *without* a web server
or using Test::WWW::Mechanize after setting up a the application with
a real web server.

So you can reuse your tests.

Gabor
--
Gabor Szabo
http://www.szabgab.com/


On 4/8/07, Dan Horne <[EMAIL PROTECTED]> wrote:
Hi all

Until now I've done very little automated testing with my C::A apps. I know
this is shock horror stuff to some, but in all honesty the apps I've been
writing for the last few years haven't really suffered from a lack of tests
(they're pretty stable, one developer -- me, localisable changes, easy to
test by hand, very few bugs reported by users).

However, this is about to change. I'm now working on a project with multiple
developers, and the changes and new functionality requests coming through
left, right and centre. The user testing is a bit spotty, so it's even more
important that there is some kind of rigorous automated testing.

So my question is: how do you go about writing your tests? I have no problem
with writing them for my model and helper modules, but I haven't got my head
around how to write tests for the controllers and views. I guess
Test::WWW::Mechanize is one module to look at, but I should also be looking
at calling my controller code directly as well as going through the front
end.

I downloaded Krang to have a look at how they've done things, but it's a
pretty big app, and there's a lot to look at.

Any hints, tips, recounting of experiences appreciated

Dan


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to