Test::A8N::TestCase - Storytest testcase object
my $tc = Test::A8N::TestCase->new({ data => [ ... ], index => ++$idx, filename => "cases/test1.tc", });
This represents an individual testcase within a test file. It encapsulates the logic around parsing test instructions, sorting them and processing their arguments in such a way that they are readable by Test::FITesque::Test.
Returns the ID property from the testcase data. If none is supplied, it generates an ID from the testcase "name" property.
ID
Returns the NAME property from the testcase data.
NAME
Returns the SUMMARY property from the testcase data.
SUMMARY
Returns an array of the TAGS list from the testcase data. An example of the expected syntax is:
TAGS
TAGS: - clustering - smoke
Returns an array of the EXPECTED list from the testcase data.
EXPECTED
Returns an array of the CONFIGURATION list from the testcase data. This can be used by fixtures to load additional configuration that may be needed to run your test.
CONFIGURATION
Returns an array of the PRECONDITIONS list, used by "test_data" to compose a list of fixture calls.
PRECONDITIONS
Returns an array of the POSTCONDITIONS list, used by "test_data" to compose a list of fixture calls.
POSTCONDITIONS
Returns an array of the INSTRUCTIONS list, used by "test_data" to compose a list of fixture calls.
INSTRUCTIONS
Returns the raw datastructure of the YAML file.
Assembles the results from "preconditions", "instructions", and "postconditions" and, using "parse_data", returns a data structure that Test::FITesque::Test can process.
Scrubs the arguments to test statements into a format that Test::FITesque::Test can process.
Test::A8N::File
Michael Nachbaur <mike@nachbaur.com>, Scott McWhirter <konobi@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.
Copyright (C) 2008 Sophos, Plc.
To install Test::A8N, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::A8N
CPAN shell
perl -MCPAN -e shell install Test::A8N
For more information on module installation, please visit the detailed CPAN module installation guide.