HTTP::WebTest::Test - Test object class
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 $value = $test->params->{$param}; my $results = $test->results; my $result = $test->result->[0]; $test->result->[0] = $result; $test->results([ @results ]); my $request = $test->request; $test->request($request); my $response = $test->response; $test->response($response); my $response_time = $test->response_time; $test->response_time($response_time);
Objects of this class represent tests. They store both test params and test results.
Constructor.
%params
A hash with test parameters.
A new HTTP::WebTest::Test object.
HTTP::WebTest::Test
A reference on hash with all test parameters.
A value of test parameter named $param.
$param
Can set HTTP::WebTest::TestResult objects for this HTTP::WebTest::Test object if an array reference $optional_results is passed.
$optional_results
A reference on array which contains HTTP::WebTest::TestResult objects.
Can set HTTP::Request object for this HTTP::WebTest::Test object if parameter $optional_request is passed.
$optional_request
A HTTP::Request object.
Can set HTTP::Response object for this HTTP::WebTest::Test object if parameter $optional_response is passed.
$optional_response
A HTTP::Response object.
Can set response time for this HTTP::WebTest::Test object if parameter $optional_response_time is passed.
$optional_response_time
A response time.
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 }
Resets test object
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::API
HTTP::WebTest::TestResult
HTTP::Request
HTTP::Response
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.