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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |