in reply to Re: Catalyst Form test
in thread Catalyst Form test

Hi, Looks like I need more help with this one. I am novice to Test::WWW::Mechanize::Catalyst.

I have a simple search application. First page(and url), asks for one input mgid. If mgid is correct, it will display new page (same url) if mgid is not of correct length/format, an error message is displayed on same page (uses c->flash->{message} format to display error message). if mgid is not found, another chance for checking with shid is given (same url /page but with words SHID : rather than MGID in first instance).

Can a test be done, to check following:
1>check if form HTTP status code is 200 (using submit_form_ok for that),
2> if 1 is ok, then check the page for words /not correct/.
3> if 2 is not ok then check the page for words /SHID:/
4> if 3 is not ok, then check page for words /Found/.

Could such a test be done? Purpose of doing such a test to make sure the flow works for all possible combination. Any suggestion/help would be appreciated.

Thanks for the quick response, time and help in advance!

Replies are listed 'Best First'.
Re^3: Catalyst Form test
by wst (Acolyte) on Apr 28, 2009 at 14:16 UTC
    figured it out. thanks!