Fed up with counting tests to discover what went wrong in your last
test run? Tired of squinting at your test source to find out where
on earth the faulty test predicate is called, and what it is supposed
to check for? Then this module is for you!
You can write test scripts without knowing the exact output this
module expects by using "Test" modules. However, by using this
module, you can know the specifics, and you can prints some
performance statistics that are computed by the Benchmark module.
Writing table-driven tests is usually a good idea. Adding a test case doesn't
require adding code, so it's easy to avoid fucking up the other tests. However,
actually going from a table of tests to a test that runs is non-trivial.
Test::TableDriven makes writing the test drivers trivial. You simply define your
test cases and write a function that turns the input data into output data to
compare against. Test::TableDriven will compute how many tests need to be run,
and then run the tests.
Concentrate on your data and what you're testing, not plan tests = scalar keys
%test_cases> and a big foreach loop.
Tools to test taintedness: "Test::More"-style
and helper functions.
Test::HasVersion lets you check a Perl module has a version number in a
Test::Simple fashion.
Test::Time can be used to test modules that deal with time. Once you
use this module, all references to time and sleep will be
internalized. You can set custom time by passing time => number after
the use statement.
Test::HexDifferences tests binary as hexadecimal string.
Embedding tests allows tests to be placed near the code its testing.
This is a nice supplement to the traditional .t files.
It's like XUnit, Perl-style.
Test::Tutorial is just documentation. To actually get anything done you
use pod2test. Read the Test::Inline::Tutorial, really.
JavaScript Object Notation (JSON) is a lightweight data interchange
format. Test::JSON makes it easy to verify that you have built
valid JSON and that it matches your expected output.