Batman2372 has asked for the wisdom of the Perl Monks concerning the following question:

we've written a web-based configurator, and now we're wanting to write a web-based script that fills out the forms of the configurator and then stores the output to a file that we may then evaluate. Anyone have some ideas on where to start? My main problem lies in that I don't want to take control of the configurator with this program, just to give it data to let it run it's course. Any suggestions would be greatly appreciated.

Replies are listed 'Best First'.
Re: Testing our work
by voyager (Friar) on Jun 19, 2001 at 02:22 UTC
    Not sure I understand your question, but I'll answer it anyway :)

    You can use HTTP::Request::Common and LWP::UserAgent to simulate form POSTs. You say you "... don't want to take control ..."; not sure what that means, but you can kick off the process and ignore the results.

    An alternate and more elegant solution is to decouple the web piece from the configuration piece: rather than have the configurator look at CGI parms have one part that gathers the CGI parms into some perl data structure (hash, let's say) that is passed to your configurator.

    Then you can test your configurator to your heart's content independent of the web front-end by passing it in any number test-case hashes. If you store this in a file some place then you can automate your regression tests ... always increases the liklihood they'll get run.

Re: Testing our work
by Beatnik (Parson) on Jun 19, 2001 at 09:56 UTC