[Http-webtest-general] Passing optional parameters
Brought to you by:
m_ilya,
richardanderson
From: William M. <wi...@kn...> - 2003-09-09 18:59:50
|
Hi list, I have been using the following code to set my URL in each of my wtscript files: on_start { URL = http://www.yahoo.com } In each of my tests I use this value as follows: url = "$URL/purchase.cgi" When using more than 2 wtscripts, it would be far easier to set this value just once (following the first virtue of good programming). I looked into the API documentation and found that I can pass in optional parameters when calling the run_wtscript function. Thus I rewrote my master script that calls each of my wtscripts as follows: $webtest->run_wtscript($file,{'URL' => $URL}); Unfortunately when I run my tests, the $URL parameter is not available and I get 500 errors because WebTest cannot find the empty domain name. Is this a bug or user error? Thanks, William -- Knowmad Services Inc. http://www.knowmad.com |