[Http-webtest-commits] CVS: HTTP-WebTest/lib/HTTP WebTest.pm,1.6,1.7
Brought to you by:
m_ilya,
richardanderson
From: Ilya M. <m_...@us...> - 2002-02-17 10:50:13
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP In directory usw-pr-cvs1:/tmp/cvs-serv8828/lib/HTTP Modified Files: WebTest.pm Log Message: Regenerated Index: WebTest.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** WebTest.pm 16 Feb 2002 00:44:14 -0000 1.6 --- WebTest.pm 17 Feb 2002 10:50:08 -0000 1.7 *************** *** 25,29 **** package HTTP::WebTest; ! $VERSION = '1.99_03'; # actual content of HTTP::WebTest package is in HTTP::WebTest::API --- 25,29 ---- package HTTP::WebTest; ! $VERSION = '1.99_04'; # actual content of HTTP::WebTest package is in HTTP::WebTest::API *************** *** 276,279 **** --- 276,306 ---- Perl metasymbols are interpreted: "\n\t" is a newline and a tab. + Also it is possible to specify Perl code instead of scalar, instead of + list parameter value or instead of element of list paramater. Curly + brackets are used to denote Perl code inside wtscript files. This + code will be evaluated during test run. + + C<HTTP::WebTest> compiles this Perl code as anonymous subroutines + which are called during test run when value of corresponding test + parameters are required. When these subroutines are called + C<HTTP::WebTest> object is passed to them. + + Some examples of syntax: + + # scalar value + name = { 1 + 1 } + + # list value (Perl code should return array reference) + name = { [ a => 'b', c => 'd' ] } + + # element of list value + name = ( + 'first value' + { "first " . "value" } + ) + + # accessing HTTP::WebTest object + name = { my $webtest = shift; ..... } + =head3 Examples of wtscript files *************** *** 347,350 **** --- 374,382 ---- test parameters. Additionally, optional global test parameters can be passed in a hash passed as the second argument. + + Instead of test parameter values subroutine references can be + specified. Referenced subroutines are called during test run when + values of corresponding test parameters are required. When called + these subroutines get C<HTTP::WebTest> object passed to them. Tests can be run as |