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 => '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() }
The Test::Litmus module handles the submission of test results to Mozilla's Litmus testcase management system.
Zach Lipton, <zach@zachlipton.com>
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>
To install Test::Litmus, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Litmus
CPAN shell
perl -MCPAN -e shell install Test::Litmus
For more information on module installation, please visit the detailed CPAN module installation guide.