|
NAMETest::Metadata - Class for capturing build and test log data and generating an XML Metadata file about it.SYNOPSISuse 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(); DESCRIPTIONThis 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 FUNCTIONSnew()Creates a new Test::Metadata object.add_build($build) Takes a Test::Parser object and extracts information about it and builds an internal build metadata representation. substitute_template($template, $data_hashref)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.to_xml()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(). parse($file)Parses the given xml (TRPI) file or url and loads the data into the current object.id()Returns the id of the parsed test.total_executedReturns the total number of executed test casestotal_passedReturns the total number of passed test casestotal_failedReturns the total number of failed test casestotal_skippedReturns the total number of test cases that were not runPREREQUISITESNoneAUTHORBryce Harrington <bryce@osdl.org>COPYRIGHTCopyright (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. SEE ALSOperl, XML::Twig
Visit the GSP FreeBSD Man Page Interface. |