Test::Metadata - Class for capturing build and test log data and generating an XML Metadata file about it.
use Test::Metadata; use Test::Parser::KernelBuild; use Test::Parser::MyTest; my $build_results = new Test::Parser::KernelBuild; $build_results->parse("kernel_build.log"); my $test_results = new Test::Parser::MyTest; $test_results->parse("my_test.log"); my $metadata = new Test::Metadata; $metadata->add_build($build_results); $metadata->add_test($test_results); print $metadata->to_xml();
This module provides an interface for creating metadata summaries of software build and test results. It is designed to work in conjunction with Test::Parser subclasses, to allow you to gather and report on a set of tests run atop a given set of built software.
Essentially, you use Test::Parser to parse all your build and test files, and then add each of them to a Test::Metadata object. You can then generate an XML file for the combined results, suitable for use with other tools.
The XML format used is the 'Test Result Publication Interface' (TRPI) XML schema, developed by SpikeSource. See http://www.spikesource.com/testresults/index.jsp?show=trpi-schema
Creates a new Test::Metadata object.
Takes a Test::Parser object and extracts information about it and builds an internal build metadata representation.
Performs substitutions of values in the form '[%variable%]' with the corresponding value given by $data_hashref->{variable}. Any undefined items are replaced with blank strings.
Returns the parsed test result data in the TRPI XML syntax (http://www.spikesource.com/testresults/index.jsp?show=trpi-schema).
In the case of an error, undef will be returned. The error message can be retrieved via error().
Parses the given xml (TRPI) file or url and loads the data into the current object.
Returns the id of the parsed test.
Returns the total number of executed test cases
Returns the total number of passed test cases
Returns the total number of failed test cases
Returns the total number of test cases that were not run
None
Bryce Harrington <bryce@osdl.org>
Copyright (C) 2005 Bryce Harrington. All Rights Reserved.
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl, XML::Twig
To install Test::Parser, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Parser
CPAN shell
perl -MCPAN -e shell install Test::Parser
For more information on module installation, please visit the detailed CPAN module installation guide.