Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

TestSuite in perl

by jbrugger (Parson)
on Mar 26, 2005 at 18:00 UTC ( #442525=perlquestion: print w/ replies, xml ) Need Help??
jbrugger has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks

For my (web)application, i use WWW::Mechanize to test the front-end of the application

However, i'd like to make the tests more flexible, and more general using an XML-file like this:
<?xml version="1.0" encoding="ISO-8859-1"?> <root> <test> <msg>Describe your test here</msg> <item id="userid" type="inputtext">MyUserName</item> <item id="password" type="inputtext">IfIShouldTellYou< +/item> <action perform="checkItems">confirmTrue</action> <action perform="submitForm">confirmFalse</action> </test> <test> <msg>Another test</msg> <item id="login.pm" type="perlmodule" /> <action perform="loadModule">confirmTrue</action> </test> </root>

On this moment, i read the file using XML::Simple, but i see some drawbacks (like if there is only one test described, i can't iterate on the tests that are given as an array in the example above

Are there any monks with more thoughts or ideas on how to create a generic, multi purpose test-suite for perl based web applications?
Thanks for your input and ideas.

"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.

Comment on TestSuite in perl
Download Code
Re: TestSuite in perl
by lachoy (Parson) on Mar 26, 2005 at 18:04 UTC

      He!, thanks, i did not know these modules, i look into them before reinventing the weel.

      "We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.
Re: TestSuite in perl
by z3d (Scribe) on Mar 28, 2005 at 12:38 UTC
    Funny, I'm doing the same thing with a config::general schema. Not sure if this will help or not, but far too late in the game I came across Test::WWW::Mechanize - might be of some value



    "I have never written bad code. There are merely unanticipated features."
      Never too late. Thanks for your input, i'll look into it.
      Right now i've got HTTP::WebTest working, but no luck at WWW::Webrobot yet, the last script seems to run, but i get no feedback.

      I'll look at your option as well, i still have to find out what method suits me the best.
      "We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://442525]
Approved by sweetblood
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2014-09-16 09:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (158 votes), past polls