To start out, let me say that I was very excitied to see Test::LectroTest come out on CPAN, I have recently stumbled onto specification based testing myself (see here for my rant on the subject). So I am looking forward to experimenting with your module myself.

One thing I would like to see in your tutorial, is more information about how to test with input other than integers. In my node on this subject, I showed a specification based test for a list, how would I do something like that with Test::LectroTest? Can I feed it a sampling of string data, which can be randomized/shuffled in some way? Nested lists? (I see in Test::LectroTest::Generator where I would find some of this info, but it would still be nice in tutorial form)

I would also like to see how to make more complex data-structures (structure being the key word there). For instance, I have a module Tree::Binary which I actually tried to do some specification based testing with (see the file 50_Tree_Binary_Theorem_Proofs_test.t for details). How would I go about using Test::LectroTest to create the random binary trees? Can I create a custom generator with Test::LectroTest? If so, how could I got about it?

I know some of these things I am talking about are more advanced uses of your module, but to be honest, I think your module really is going to appeal to a crowd which is likely to use those features. Specification based testing is not a beginners subject, and IMO has a somewhat steep learning curve (at least for us non-math/CS majors out here). I would suggest keeping that in mind and not be afraid to write the more advanced stuff.

-stvn

In reply to Re: Care you lend me your widsom? And your eyes, too? by stvn
in thread RFC: Tutorial on Testing by tmoertel

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.