Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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)


In reply to Re: Wanted, more simple tutorials on testing by rinceWind
in thread Wanted, more simple tutorials on testing by punkish

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-25 09:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found