GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  TEST::METADATA (3)

.ds Aq ’

NAME

Test::Metadata - Class for capturing build and test log data and generating an XML Metadata file about it.

CONTENTS

SYNOPSIS



 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();



DESCRIPTION

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

FUNCTIONS

new()

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, CW$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_executed

Returns the total number of executed test cases

    total_passed

Returns the total number of passed test cases

    total_failed

Returns the total number of failed test cases

    total_skipped

Returns the total number of test cases that were not run

PREREQUISITES

None

AUTHOR

Bryce Harrington <bryce@osdl.org>

COPYRIGHT

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.

SEE ALSO

perl, XML::Twig
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 TEST::METADATA (3) 2008-02-27

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.