The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


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


  use Test::Litmus;
  $t = Test::Litmus->new(-machinename => 'mycomputer',
                                                 -username => 'user', 
                                                 -authtoken => 'token',
                        # optional # -server => '', 
                        # 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'),
                                                                                -type => 'Extensions Installed',
                                                                                -data => 'log information here')]
  # $t->addResult($someOtherResult);
  # etc...
  # add log information that should be linked with 
  # all results (i.e. env variables, config info)
                                                                -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() }


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



Zach Lipton, <>


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

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 <>