The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Test::Litmus - Perl module to submit test results to the Litmus testcase management tool

SYNOPSIS

  use Test::Litmus;
  
  $t = Test::Litmus->new(-machinename => 'mycomputer',
                                                 -username => 'user', 
                                                 -authtoken => 'token',
                        # optional # -server => 'http://litmus.mozilla.org/process_test.cgi', 
                        # optional # -action => 'submit');
                        
  $t->sysconfig(-product => 'Firefox',
                                -platform => 'Windows', 
                                -opsys => 'Windows XP', 
                                -branch => 'Trunk', 
                                -buildid => '2006061314',
                                -buildtype => 'debug cvs',
                                -locale => 'en-US');
  
  my $result = Test::Litmus::Result->new(
                                                        -isAutomatedResult => 1, # optional
                                                        -testid => 27,
                                                        -resultstatus => 'pass', # valid results are 'pass'
                                                                                                         # or 'fail'
                                                        -exitstatus => 0,
                                                        -duration => 666,
                                                        -timestamp => 20051111150944, # optional (default: current time)
                                                        -comment => 'optional comment here', # optional
                                                        -bugnumber => 300010,                            # optional
                                                        -log => [Test::Litmus::Log->new(         # optional
                                                                                -type => 'STDOUT',
                                                                                -data => 'foobar'),
                                                                         Test::Litmus::Log->new(
                                                                                -type => 'Extensions Installed',
                                                                                -data => 'log information here')]
                                                        );
  $t->addResult($result);
  # $t->addResult($someOtherResult);
  # etc...
  
  # add log information that should be linked with 
  # all results (i.e. env variables, config info)
  $t->addLog(Test::Litmus::Log->new(
                                                                -type => 'STDOUT',
                                                                -data => 'log data')); 
  
  my $res = $t->submit();
  
  # $res is 0 for non-fatal errors (some results were submitted), and 
  # undef for fatal errors (no results were submitted successfully)
  
  if ($t->errstr()) { die $t->errstr() }

DESCRIPTION

The Test::Litmus module handles the submission of test results to Mozilla's Litmus testcase management system.

SEE ALSO http://litmus.mozilla.org http://wiki.mozilla.org/Litmus http://wiki.mozilla.org/Litmus:Web_Services

AUTHOR

Zach Lipton, <zach@zachlipton.com>

COPYRIGHT AND LICENSE

The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

The Original Code is Test::Litmus.

The Initial Developer of the Original Code is The Mozilla Corporation.

Portions created by the Initial Developer are Copyright (C) 2006 the Initial Developer. All Rights Reserved.

Contributor(s): Zach Lipton <zach@zachlipton.com>