Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Wanted, more simple tutorials on testing

by rinceWind (Monsignor)
on Jul 22, 2005 at 15:18 UTC ( #477251=note: print w/replies, xml ) Need Help??

in reply to Wanted, more simple tutorials on testing

Sorry I can't offer you a tutorial, but take a look at the tests that come with OpenGuides and the CGI::Wiki family of modules. You should be able to find examples of the kind of scenarios your wiki formatter needs to cope with, especially as we were doing very much the same job.

This highlights an interesting design point, in that if you separate the text munging from the web stuff, you can write tests that don't rely on having Apache running, let alone configured.

Basically, I don't want to test for things I know. I want to test for all the possible arbitrary text that users could throw, and see if my module can format it to valid html in the manner that the users expected it to do.

That's a toughy. You DO want to write tests for things you know - this is a starting point. In terms of all possible text, this is fairly intractible. Consider the documentation. The pod that goes with the module gives examples of how to use it - these examples should be included in the tests. For the more esoteric scenarios, my advice would be to get a project team or an on-line community together, inviting feedback from as many tech-savvy users as possible. Every time you find something that misbehaves, write a test for it.

Good luck with your module


Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)

  • Comment on Re: Wanted, more simple tutorials on testing

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2020-10-29 14:20 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (271 votes). Check out past polls.