TAP output transfers configuration information.
The functions in this module essentially serve as wrappers around the 'ok' functions - for more information on this, please refer to Test::Simple on www.cpan.org. If you require additional information on the TAP format, you may also refer to Test::TAP::Model on www.cpan.org.
It's important to remember that each of the functions within this module is considered a single test statement and must be factored into your overall test plan. Additionally, this module is seen as a sub-class of Test::Builder.
To begin utilizing this module, you'll need to include it in your typical test.t file. You can do so using the following code:
#!/usr/bin/perl
use Test::More tests => 3; // declare your tests as usual
use Integrator::Test::ConfigData; // add this to have access to the module's functions
You can then utilize the various test functions provided by this module. Below are examples of different tests you can run:
- A test to produce a measurement in the TAP output:
my $fan_speed = function_that_returns_some_fan_speed();
measure( 'fan speed on FAN1', 'FAN_TACH1', $fan_speed, 'RPM', 0.1, 'TACH_123' );
- A test to declare a component state in the TAP output:
component( 'locking a blade in place', 'CPU_BLADE', 'SN0010023', 'HANDLE', 'LOCKED' );
- A test to store a config file in the TAP output:
config_file( 'last night temperature log', '/var/log/heat.log.00');
- A test to store config data in the TAP output:
my $string = 'SERIAL_NUMER=1234;18Sept1970';
config_data( 'last night temperature log', 'serial_number_and_date', $string);
Overall, Integrator::Test::ConfigData is an extremely useful Perl module that offers a streamlined solution for configuration information transfer in the TAP output.
Version 1.057: N/A