NAME

HTTP::WebTest::Test - Test object class

SYNOPSIS

use HTTP::WebTest::Test;

my $test = HTTP::WebTest::Test->new(%params);
my $test = HTTP::WebTest::Test->convert($raw_test);

my $value = $test->param($param);

my $results = $test->results;
my $result = $test->result->[0];
$test->result->[0] = $result;
$test->results([ @results ]);

DESCRIPTION

Objects of this class represent tests. They store both test params and test results.

CLASS METHODS

new (%params)

Constructor.

Parameters

  • %params

    A hash with test parameters.

Returns

A new HTTP::WebTest::Test object.

param ($param)

Returns

A value of test parameter named $param.

results ($optional_results)

Can set HTTP::WebTest::TestResult objects for this HTTP::WebTest::Test object if an array reference $optional_results is passed.

Returns

A reference on array which contains HTTP::WebTest::TestResult objects.

convert ($test)

Tries to convert test definition in some form into HTTP::WebTest::Test object. Currenlty supports test defintion in form of HTTP::WebTest::Test object (it is just passed throw) or in form of hash reference:

{ test_param1 => test_value1, test_param2 => test_value2 }

Returns

A new HTTP::WebTest::Test object.

COPYRIGHT

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.

SEE ALSO

HTTP::WebTest

HTTP::WebTest::TestResult