What everyone said already. Testing in Perl is really quite easy.

# some-test.t use strict; use Test::More; ok(1, "1 is okay"); is("A", "A", "A is A"); cmp_ok("B", "gt", "A", "B is greater than puny A"); isnt("A", "B", "A didn't magically become B"); like("this", qr/that/, "This is like that"); done_testing(5);
moo@cow[326]~>prove some-test.t -v some-test.t .. ok 1 - 1 is okay ok 2 - A is A ok 3 - B is greater than puny A ok 4 - A didn't magically become B not ok 5 - This is like that 1..5 # Failed test 'This is like that' # at ab.t line 7. # 'this' # doesn't match '(?-xism:that)' # Looks like you failed 1 test of 5. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/5 subtests Test Summary Report ------------------- ab.t (Wstat: 256 Tests: 5 Failed: 1) Failed test: 5 Non-zero exit status: 1 Files=1, Tests=5, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.01 cusr + 0.00 csys = 0.03 CPU) Result: FAIL

More reading: prove (App::Prove), Test::Simple, Test::More, Test::Fatal, and many, many more for specific applications like Test::WWW::Selenium.


In reply to Re: How to create testcase executor? by Your Mother
in thread How to create testcase executor? by anurag_perl

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.