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


Test-Litmus documentation  | view source Contained in the Test-Litmus distribution.

Index


NAME

Top

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

SYNOPSIS

Top

  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

Top

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

Top

AUTHOR

Top

Zach Lipton, <zach@zachlipton.com>

COPYRIGHT AND LICENSE

Top


Test-Litmus documentation  | view source Contained in the Test-Litmus distribution.