Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Yet another meditation on testing

by simonm (Vicar)
on Feb 14, 2004 at 18:04 UTC ( #329006=note: print w/replies, xml ) Need Help??

in reply to Yet another meditation on testing

Web application testing is definitely a trouble area for testing fanatics, due to the issues you're describing.

I think the best practical advice I have for you is to use WWW::Mechanize. Each test script can model a certain type of common interaction, with test code for things like "load the home page", "follow the link that says Search", "fill in a query term and submit", and "does the current page have a link to the page we expect to find?"

If you were starting from scratch, and looking to build a more-testable web application, I might suggest the approach laid out in XP for Web Projects: structure the core of your web application to accept and return XML, and then use stylesheets to transform that into your HTML interface. That way, you can test your application logic using command-line XML tests, then test your stylesheets independently. (It also sets you up to support alternative interfaces such as automated web services.)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://329006]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2021-03-05 04:41 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (109 votes). Check out past polls.