HTTP::WebTest::TestResult - Test results class
use HTTP::WebTest::TestResult; my $result = HTTP::WebTest::TestResult; my $bool = $result->ok; $result->ok($bool); my $comment = $result->comment; $result->comment($comment); if($result) { ... }
Objects of this class represent test results. Test results are basicaly ok/not ok and some attached commentary.
ok
not ok
This class overloads bool operation so it can be directly used in statements that require boolean values.
bool
if($result) { ... }
is equivalent to
if($result->ok) { ... }
Constructor
A new HTTP::WebTest::TestResult object.
HTTP::WebTest::TestResult
Defines if test is successful or not if $optional_ok is passed.
$optional_ok
True if test is successful. False otherwise.
Sets test result comment if $optional_comment is passed.
$optional_comment
A test result comment.
Copyright (c) 2001,2002 Ilya Martynov. All rights reserved.
This module is free software. It may be used, redistributed and/or modified under the terms of the Perl Artistic License.
HTTP::WebTest
HTTP::WebTest::Test
To install HTTP::WebTest, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTTP::WebTest
CPAN shell
perl -MCPAN -e shell install HTTP::WebTest
For more information on module installation, please visit the detailed CPAN module installation guide.