You've set a pretty daunting task for youself, here.

It's pretty easy to determine what fields are on the form, using HTML::Parser, or some of the other CPAN tools. However, are you looking to parse forms where you don't know the expected content? Even a simple form, with a couple of input fields, a few radio buttons, and a couple of drop down boxes will yield thousands of possible combinations.

Will the forms contains any JavaScript to perform on-the-fly input validation? If so, I'm not aware of any Perl modules that will allow you to run JavaScript in the context of a webpage.

I certainly can't see a practical way to run a test for all possible combinations of an unknown webpage. Perhaps if you had a description language of some kind, and coded a template for each page to test against, you could achieve something reasonable.

Testing these kinds of things dynamically are especially difficult. Your best bet may be to write a template that exercises various combinations for each known page, and know that for certain type fields you need to test putting bad e-mail addresses in e-mail fields, letters in phone number fields, etc.

I know these weren't the specific answers you were looking for, but having been involved in automated testing for Windows applications (please, don't everyone start gagging), I know about some of the difficulties.

--Chris

In reply to (jcwren) Re: Parsing CGI form data by jcwren
in thread Parsing CGI form data by Arsenal

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.