>>>>> On Thu, 29 Aug 2002 09:22:55 -0400, "William McKee" <wi...@kn...> said:
WM> Hi all,
WM> I have been using Webtest to test my scripts on a test server. Now that
WM> they have moved over to the production server, I find that I need to
WM> change all of my url entries. Easy enough with a good editor, but it seems
WM> like there should be a way to globally define the url.
WM> Then I realized that if Webtest can handle cookies, it can perhaps handle
WM> relative links so that I do not need to reenter the absolute url after my
WM> first test case. Aspiring to the Perl virtue of laziness, I thought I'd
WM> throw this idea out to the list before going off to test it myself.
With latest HTTP::WebTest you can write tests as
plugins = ( ::Hooks )
on_start = { $URL = 'http://domain' }
...
test_name = XXX
url = "$URL/path1"
...
end_test
test_name = YYY
url = "$URL/path2"
...
end_test
BTW I had an idea to implement relative links too.
--
Ilya Martynov (http://martynov.org/)
|