http-webtest-general Mailing List for HTTP-WebTest (Page 13)
Brought to you by:
m_ilya,
richardanderson
You can subscribe to this list here.
2002 |
Jan
(1) |
Feb
(6) |
Mar
(2) |
Apr
(3) |
May
(6) |
Jun
(10) |
Jul
(24) |
Aug
(19) |
Sep
(8) |
Oct
(33) |
Nov
(11) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(20) |
Feb
(4) |
Mar
(28) |
Apr
(18) |
May
(6) |
Jun
|
Jul
(23) |
Aug
(5) |
Sep
(11) |
Oct
(29) |
Nov
(24) |
Dec
(10) |
2004 |
Jan
(2) |
Feb
(4) |
Mar
(40) |
Apr
(4) |
May
(8) |
Jun
(13) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2005 |
Jan
(1) |
Feb
(7) |
Mar
|
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: William M. <wi...@kn...> - 2002-10-11 21:40:37
|
On 12 Oct 2002 at 1:20, Ilya Martynov wrote: > Hmm. It is going to become a FAQ. Strange it is not in the > archives. Probably I should just explain SSL support in HTTP::WebTest > documentation. That would be helpful; I checked both the cookbook and the main pod for references. Is there a separate FAQ document for WebTest? BTW, my search for ssl in the SourceForge archives turned up no responses. Simply installing Crypt::SSLeay, as explained in the README.SSL file you mentioned, did the job! Thanks, William -- Lead Developer Knowmad Services Inc. || Internet Applications & Database Integration http://www.knowmad.com |
From: Ilya M. <il...@ma...> - 2002-10-11 21:23:03
|
>>>>> On Fri, 11 Oct 2002 16:51:36 -0400, "William McKee" <wi...@kn...> said: WM> Hi Ilya, WM> I'm trying to test a form on an SSL server. However, I'm getting error WM> messages which are probably due to missing ssl support in LWP. I went to WM> do a search on the mail archives and surprisingly didn't find any WM> discussion about ssl in there. I'm off to read up on LWP next but thought WM> I'd toss this out for discussion. Hmm. It is going to become a FAQ. Strange it is not in the archives. Probably I should just explain SSL support in HTTP::WebTest documentation. Anyway it is documented in README.SSL which you can find in libwww distro: http://search.cpan.org/src/GAAS/libwww-perl-5.65/README.SSL WM> Also, while looking for the link to the mailing list archives, I WM> discovered that the link to the list page on SourceForge contains an WM> ending period which causes the link to fail. See the Support section of WM> the HTTP::Webtest POD. Thanks. I'll add a space there to prevent it. -- Ilya Martynov, il...@ip... CTO IPonWEB (UK) Ltd Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net Personal website - http://martynov.org |
From: William M. <wi...@kn...> - 2002-10-11 20:51:42
|
Hi Ilya, I'm trying to test a form on an SSL server. However, I'm getting error messages which are probably due to missing ssl support in LWP. I went to do a search on the mail archives and surprisingly didn't find any discussion about ssl in there. I'm off to read up on LWP next but thought I'd toss this out for discussion. Also, while looking for the link to the mailing list archives, I discovered that the link to the list page on SourceForge contains an ending period which causes the link to fail. See the Support section of the HTTP::Webtest POD. Thanks, William -- Lead Developer Knowmad Services Inc. || Internet Applications & Database Integration http://www.knowmad.com |
From: Ilya M. <il...@ma...> - 2002-10-09 16:26:43
|
>>>>> On Wed, 9 Oct 2002 17:08:47 +0200, Kevin Baker <ke...@ri...> said: KB> Ilya, KB> first big thanks to Richard and you for a very useful module. Thank you for your kind words. KB> I was wondering if you'd consider a feature. We sometimes like KB> to test code that depends on the HTTP_USER_AGENT. The field is always KB> set to "WebTest/$VERSION " . $user_agent->agent() at the moment KB> but it'd be handy to be able to set it abitrarily. For instance to KB> exercise code that displays different features depending on the KB> type of browser. KB> I added a 'user_agent' field to the test_options hash to test it out. KB> What do you think? Perhaps this could be taken further and specified KB> per test as well. KB> Kev Hi Kevin, Thanks for you patch but this feature is already in beta branch of HTTP-WebTest. You can get it from http://search.cpan.org/author/ILYAM/HTTP-WebTest/ Since version 1.99_04 you can use 'user_agent' to specify user agent and since 1.99_06 you can set any HTTP header in requests using 'http_headers'. P.S. In the future please use official module mailling lists for questions/comments/suggestions/etc so others can benefit from answers. You can subscribe at http://lists.sourceforge.net/lists/listinfo/http-webtest-general (though it doesn't require subscription to post there). -- Ilya Martynov, il...@ip... CTO IPonWEB (UK) Ltd Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net Personal website - http://martynov.org |
From: William M. <wi...@kn...> - 2002-10-08 15:22:57
|
On 8 Oct 2002 at 18:34, Ilya Martynov wrote: > >>>>> On Sun, 6 Oct 2002 11:23:15 -0400, "William McKee" > >>>>> <wi...@kn...> said: > > WM> Hi Ilya, > WM> I'm having troubles using the on_response hook in one of my tests. I'm > WM> using the hook to grab a dynamically generated value as shown in the > WM> Cookbook. However, I also have some text_require settings in place. For > WM> some reason, the first text_require succeeds but the following ones > fail WM> (even though the words are in the page output). > > WM> I read about the on_response handler in the docs but am not really sure > WM> what the return list is doing. Should I be setting it to something in > WM> order for these tests to succeed? I can send the entire test results if > WM> that would help. > > If you return a ref on empty list then on_response return value is > simply ignored. It should not affect text_require in any way. > > Try to add > > show_html = yes > > to check that those words are indeed > in the page output. Hi Ilya, I do use show_html which is why I said in my original email that the words were in the page output. Once I corrected my regex, the tests succeeded. Sounds like a possible bug. However, my test script that I just built works fine. If I track anything down, I'll let you know. William -- Lead Developer Knowmad Services Inc. || Internet Applications & Database Integration http://www.knowmad.com |
From: William M. <wi...@kn...> - 2002-10-08 14:57:26
|
On 8 Oct 2002 at 18:39, Ilya Martynov wrote: > WM> STATUS CODE CHECK > WM> Expected '200' and got: 500 read timeout FAIL > As I understand LWP can encounter two types of timeouts: > > 1) timeout while waiting for connection > 2) timeout after connecting waiting for response > > I would expect #2 to be more rare than #1. Ahh, that makes sense. So perhaps the error message above was generated by the #2 timeout since I've only seen it once whereas the 500 error connecting to remote host was more common. Thanks, William -- Lead Developer Knowmad Services Inc. || Internet Applications & Database Integration http://www.knowmad.com |
From: Ilya M. <il...@ma...> - 2002-10-08 14:41:13
|
>>>>> On Sun, 6 Oct 2002 11:23:15 -0400, "William McKee" <wi...@kn...> said: WM> Hi Ilya, WM> I'm having troubles using the on_response hook in one of my tests. I'm WM> using the hook to grab a dynamically generated value as shown in the WM> Cookbook. However, I also have some text_require settings in place. For WM> some reason, the first text_require succeeds but the following ones fail WM> (even though the words are in the page output). WM> I read about the on_response handler in the docs but am not really sure WM> what the return list is doing. Should I be setting it to something in WM> order for these tests to succeed? I can send the entire test results if WM> that would help. If you return a ref on empty list then on_response return value is simply ignored. It should not affect text_require in any way. Try to add show_html = yes to check that those words are indeed in the page output. -- Ilya Martynov, il...@ip... CTO IPonWEB (UK) Ltd Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net Personal website - http://martynov.org |
From: Ilya M. <il...@ma...> - 2002-10-08 14:41:11
|
>>>>> On Fri, 4 Oct 2002 11:38:42 -0400, "William McKee" <wi...@kn...> said: WM> Hi Ilya, WM> Well, I posted a message to libwww but nobody took up the question. I WM> guess it's working ok for them and I'll just have to learn to live with WM> apparently bogus 500 errors when the script running on my workstation WM> cannot get a connection to the remote web server. Interestingly, I WM> received a different error this morning that indicated a timeout condition WM> had occurred: WM> STATUS CODE CHECK WM> Expected '200' and got: 500 read timeout FAIL WM> I'm not sure why I'd get the above error sometimes and the "could not WM> connect" error I reported earlier this week at other times. I have error WM> logs which show a could not connect in the first test followed by three WM> successful tests, so it's obviously not a problem with my server esp. WM> since my server error logs are clean. Fortunately, I've tracked down my WM> bug and can turn down the volume of testing to a reasonable level (I was WM> testing every minute). As I understand LWP can encounter two types of timeouts: 1) timeout while waiting for connection 2) timeout after connecting waiting for response I would expect #2 to be more rare than #1. -- Ilya Martynov, il...@ip... CTO IPonWEB (UK) Ltd Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net Personal website - http://martynov.org |
From: William M. <wi...@kn...> - 2002-10-06 15:22:52
|
Hi Ilya, I'm having troubles using the on_response hook in one of my tests. I'm using the hook to grab a dynamically generated value as shown in the Cookbook. However, I also have some text_require settings in place. For some reason, the first text_require succeeds but the following ones fail (even though the words are in the page output). I read about the on_response handler in the docs but am not really sure what the return list is doing. Should I be setting it to something in order for these tests to succeed? I can send the entire test results if that would help. Below is a snippet from my test params for the test that is failing: text_require = ( Rater records successfully updated. Craig McKee ) # get the new event_id on_response = { # get webtest object my $webtest = shift; # find event_id in the returned page ($rater_id) = $webtest->last_response->content =~ /\&rater_id=(\d+)\">Craig</; # because no checks are defined a reference on empty array # must be returned []; } Thanks, William -- Lead Developer Knowmad Services Inc. || Internet Applications & Database Integration http://www.knowmad.com |
From: William M. <wi...@kn...> - 2002-10-04 15:38:28
|
Hi Ilya, Well, I posted a message to libwww but nobody took up the question. I guess it's working ok for them and I'll just have to learn to live with apparently bogus 500 errors when the script running on my workstation cannot get a connection to the remote web server. Interestingly, I received a different error this morning that indicated a timeout condition had occurred: STATUS CODE CHECK Expected '200' and got: 500 read timeout FAIL I'm not sure why I'd get the above error sometimes and the "could not connect" error I reported earlier this week at other times. I have error logs which show a could not connect in the first test followed by three successful tests, so it's obviously not a problem with my server esp. since my server error logs are clean. Fortunately, I've tracked down my bug and can turn down the volume of testing to a reasonable level (I was testing every minute). Cheers! William -- Lead Developer Knowmad Services Inc. || Internet Applications & Database Integration http://www.knowmad.com |
From: William M. <wi...@kn...> - 2002-10-02 12:58:01
|
On 2 Oct 2002 at 12:41, Ilya Martynov wrote: > Yes, I'm using LWP for networking operations. Yes, LWP generates such > error messages itself. When it encounters an error it just generates > HTTP::Response object with status code 500. Frankly I don't know if it is > possible at all to distinguish errors received from a server from LWP > generated errors (other than using regexps on error messages what is very > error prone). Hi Ilya, Thanks for the reply. I've created a test script using LWP which demonstrates the error message received when an invalid url is used or a valid url is used but a connection cannot be made (I disconnected my ethernet cable for this test). See code at end for my sample test. Both tests result in the following error message from LWP: "500 (Internal Server Error) Can't connect to www.yahoo.edu:80 (Bad hostname 'www.yahoo.edu')" That doesn't seem like a valid response from LWP. I've searched their mailling list archives and found one message which suggests that a 504 response should be returned for an invalid dns entry. However, I saw no discussion about what a timeout should return. I've just joined the list and posted this query. Should be interesting to see what feedback I get... I'll keep you posted. Cheers, William --------- #!/usr/bin/perl -Tw use strict; # # TESTING HTTP::RESPONSE # use LWP::UserAgent; use HTTP::Request; use HTTP::Response; my $url = 'http://www.yahoo.edu'; # invalid url #my $url = 'http://www.yahoo.com'; # valid url - be sure your connection times out to see error my $ua = LWP::UserAgent->new; my $request = HTTP::Request->new(GET => $url); my $response = $ua->request($request); if ($response->is_success) { print $response->content; } else { print $response->as_string; } ------------ -- Lead Developer Knowmad Services Inc. || Internet Applications & Database Integration http://www.knowmad.com |
From: Ilya M. <il...@ma...> - 2002-10-02 08:44:31
|
>>>>> On Tue, 1 Oct 2002 21:02:13 -0400, "William McKee" <wi...@kn...> said: WM> Greetings Ilya, Hi William, WM> I received a couple of error messages today from a script which I'm WM> running every minute via a crontab. The errors indicate that WebTest WM> received a 500 - Internal Server Error message. However, I saw no such WM> errors in my server logs. WM> I began to wonder whether WebTest just couldn't connect to the server. So WM> I created a sample script (see below) to try to test this theory. Indeed, WM> it seems that when WebTest cannot access a server (due to an invalid url WM> or a connection timeout), it is returning a 500 error. WM> This response does not seem accurate. I'm not sure where this status code WM> is coming from but was able to track the actual error message to the WM> StatusTest.pm module. Could you test and verify my results? Do you use the WM> LWP to make the actual connections? Is this error message generated from WM> those libraries? Yes, I'm using LWP for networking operations. Yes, LWP generates such error messages itself. When it encounters an error it just generates HTTP::Response object with status code 500. Frankly I don't know if it is possible at all to distinguish errors received from a server from LWP generated errors (other than using regexps on error messages what is very error prone). -- Ilya Martynov (http://martynov.org/) |
From: William M. <wi...@kn...> - 2002-10-02 01:02:07
|
Greetings Ilya, I received a couple of error messages today from a script which I'm running every minute via a crontab. The errors indicate that WebTest received a 500 - Internal Server Error message. However, I saw no such errors in my server logs. I began to wonder whether WebTest just couldn't connect to the server. So I created a sample script (see below) to try to test this theory. Indeed, it seems that when WebTest cannot access a server (due to an invalid url or a connection timeout), it is returning a 500 error. This response does not seem accurate. I'm not sure where this status code is coming from but was able to track the actual error message to the StatusTest.pm module. Could you test and verify my results? Do you use the LWP to make the actual connections? Is this error message generated from those libraries? Thanks, William --------------- #!/usr/bin/perl -Tw # # TESTING HTTP::WEBTEST # use strict; use HTTP::WebTest; my $wtscript_testfile; my $webtest = new HTTP::WebTest; my $tests = [ # Test 1 { test_name => 'Yahoo Homepage', url => 'http://www.yahoo.com', text_require => [ 'Yahoo'], text_forbid => [ 'The server encountered an internal error' ], }, # Test 2 { test_name => 'Bad URL', url => 'http://www.yahoo.edu', params => {}, text_require => [ 'Yahoo U' ], text_forbid => [ 'The server encountered an internal error' ], }, ]; my $params = { ignore_case => 'yes', terse => 'failed_only', show_html => 'yes', }; $webtest->run_tests($tests, $params); -------------- -- Lead Developer Knowmad Services Inc. || Internet Applications & Database Integration http://www.knowmad.com |
From: Ilya M. <il...@ma...> - 2002-09-27 19:52:21
|
>>>>> On Fri, 27 Sep 2002 15:39:29 -0400, "William McKee" <wi...@kn...> said: WM> Hi Ilya, WM> I was writing a quick script to run a couple tests using the Example shown WM> in the section "Calling HTTP::WebTest from a Perl program" of the 1.99_09 WM> release. The example says that the test name should be defined as 'name' WM> (e.g., Yahoo home page). I discovered that it should actually be WM> 'test_name'. I can provide more details if this cryptic report doesn't WM> make sense. You are right. Thanks for catching this doc bug. -- Ilya Martynov (http://martynov.org/) |
From: William M. <wi...@kn...> - 2002-09-27 19:39:26
|
Hi Ilya, I was writing a quick script to run a couple tests using the Example shown in the section "Calling HTTP::WebTest from a Perl program" of the 1.99_09 release. The example says that the test name should be defined as 'name' (e.g., Yahoo home page). I discovered that it should actually be 'test_name'. I can provide more details if this cryptic report doesn't make sense. Cheers! William -- Lead Developer Knowmad Services Inc. || Internet Applications & Database Integration http://www.knowmad.com |
From: Ilya M. <il...@ma...> - 2002-09-15 17:37:32
|
>>>>> On Sun, 15 Sep 2002 10:14:25 -0400, Jieming Wang <Jie...@en...> said: JW> Hi All, JW> I have some URL that is generated based on the cookies. JW> For example, the main page is http://server/scripts.pl which will generate a JW> dynamic login page as follow: JW> <html> JW> ... JW> <form method="post" action="/scripts/main_cookie/cookie_id=="> JW> ... JW> </html> JW> Here main_cookie and cookie_id are dynamically generated. Below are some JW> examples of the pages generated: JW> <form method="post" JW> action="/scripts/webgui5f9c372c/~flN0YXRlPTE3OTMzLjAwMS4wMS4wMQ=="> JW> <form method="post" JW> action="/scripts/webgui5f9c1e55/~flN0YXRlPTQ1ODYuMDA0LjA0LjA0=="> JW> <form method="post" JW> action="/scripts/webgui5f9c243d/~flN0YXRlPTIwMzkuMDA2LjA0LjA0=="> JW> Can we use webtest to handle this situation? Is it really a cookie? Looks like URL based sessions (i.e. when session IDs are encoded in URL). If the latest than something simular to 'Dynamic Tests' example in HTTP::WebTest::Cookbook. I.e. test should look like test_name = Login page url = http://domain/ on_response = { my $webtest = shift; ($MAIN_COOKIE, $COOKIE_ID) = $webtest->last_response->content =~ m|/ scripts / (\w+) / (\w+)|x; []; } end_test .... test_name = Submit Login Form url = "http://domain/scripts/$MAIN_COOKIE/$COOKIE_ID" ... end_test You can also automate it by using Click plugin. It allows you to use button and link names instead of URLs. See perldoc HTTP::WebTest::Cookbook and perldoc HTTP::WebTest::Plugin::Click for details. -- Ilya Martynov (http://martynov.org/) |
From: Jieming W. <Jie...@en...> - 2002-09-15 14:14:33
|
Hi All, I have some URL that is generated based on the cookies. For example, the main page is http://server/scripts.pl which will generate a dynamic login page as follow: <html> ... <form method="post" action="/scripts/main_cookie/cookie_id=="> ... </html> Here main_cookie and cookie_id are dynamically generated. Below are some examples of the pages generated: <form method="post" action="/scripts/webgui5f9c372c/~flN0YXRlPTE3OTMzLjAwMS4wMS4wMQ=="> <form method="post" action="/scripts/webgui5f9c1e55/~flN0YXRlPTQ1ODYuMDA0LjA0LjA0=="> <form method="post" action="/scripts/webgui5f9c243d/~flN0YXRlPTIwMzkuMDA2LjA0LjA0=="> Can we use webtest to handle this situation? Thanks. JW |
From: Johannes la P. <joe...@us...> - 2002-09-12 13:47:07
|
Hi, A new plugin for HTTP::WebTest has been imported to CVS as a separate module, HTTP-WebTest-Plugin-DateTest. It's purpose is to test web pages for "freshness" by comparing embedded date string(s) to the current time. The test is passed if the difference is less than the time specified as a test parameter. How to get it ========= For now, just retrieve the module from CVS as usual: cvs -d:pserver:ano...@cv...:/cvsroot/http-webtest login cvs -z3 -d:pserver:ano...@cv...:/cvsroot/http-webtest co HTTP-WebTest-Plugin-DateTest In the near future I'm planning to make the module available from CPAN. From the README: =============== ABSRACT DateTest is a plugin module for the HTTP::WebTest suite. This plugin provides tests for the "age" of embedded date strings in the response body of a HTTP request (typically a webpage). Limited support is available for international languages, as long as a Date::Format module for this language exists (part of DateTime) and the notational convention doesn't differ too much from English conventions. More detail is available from the module's documentation: perldoc HTTP::WebTest::Plugin::DateTest DEPENDENCIES This module requires these other modules and libraries: HTTP::WebTest (version 1.99 or newer) DateTime (version 1.13 or newer recommended) BUGS Many potentially. Note that the ability to parse a date string correctly is entirely dependent on Date::Parse for English language strings. Internationalization support is far more limited. ========= Installation should be a simple standard process if HTTP::WebTest has been installed before. Please give it a try and let me know of any bugs you find or enhancements you may need! Cheers, Joe. |
From: Paul H. <Pau...@Ti...> - 2002-09-06 18:14:04
|
On Thu, 2002-09-05 at 05:31, Ilya Martynov wrote: ... snip ... > If you are trying to add new tests dynamically then it is not what > HTTP::WebTest is supposed to handle. Yet it should be possible to do > but anyway I think it is wrong approach. Perhaps if I show you what I am trying to do, this will make more sense. I'm attaching 3 files that you will need to run, and a sample result, so if you don't want to run it, you can see what I managed to achieve. I have been running the tests against our QA servers, and not the live site, but it should work there at this time (I would appreciate restraint if you do try to run it.) You were absolutely correct that run_test() would allow you to deal with a single test run. I wanted to also be able to get the results from those tests back as part of the reports. > If you want the other way of > running individual tests you can run them manually via method > run_test(). This method runs individual test (opposed to running whole > test sequence with run_tests()). In this case you have full control on > forming test queue. But I had to make some changes to both run_test and run_tests to add support for a stack to handle the tests and results as the loop recursed through the pages until it hit the terminating page. I also had to deal with the fact that the tests stack was dynamically expanding at runtime. > Anyway if you need more specific advice show your code. OK - I've stayed out of the HTTP::WebTest namespace for the plugin - it's still under construction, and I didn't want to intrude. I did have to put my fingerprints all over API.pm - please realize this is just a proof of concept to show what I'm thinking about. Our site is based on a series of templates that sit on top of a database, so I don't always know everything that will be on a page or series of pages in advance. Our team is trying to work out a modular system of tests that can be strung together in various combinations and reused depending on which area we are looking at. I think HTTP::WebTest is an excellent tool for this, and I look forward to your comments (that goes for everybody on the list, please and thank you!) Attached: api_loopable_patch [a diff -c for API.pm] Loopable.pm [plugin module in TMOLQA::WebTest::Plugin namespace] just_a_webtest5.pl [perl test script - has 4 tests, 2 will loop] loop_look [test results] -- Paul Hamingson QA Engineer Ticketmaster-Online |
From: Ilya M. <il...@ma...> - 2002-09-05 12:31:34
|
>>>>> On 03 Sep 2002 17:52:22 -0700, Paul Hamingson <Pau...@Ti...> said: PH> Ilya, Hi Paul, PH> I am working on a problem that you may have already given some thought PH> to. I'm trying to come up with a plugin that loops through a series of PH> pages that are templated, testing each to see if it meets the PH> qualifications and if so, rewritting the URL to get the next. An example PH> would be a search engine result, where the number of iterations are PH> unknown going into the test. PH> I have been able to mangle some code to get the looping to happen, but I PH> get hung up on how to integrate the test results so that they report the PH> correct URL for each one and get loaded on the stack in the correct PH> order ( right now I am getting the outer test first, then the one from PH> the loop in the reverse order.) PH> Right now my code is in an embarrassing state with print statements PH> everywhere, so if you are would like me to show you what I mean, I will PH> clean it up before I let it air in public. Not sure what you are trying to do without seeing the code. If you are trying to add new tests dynamically then it is not what HTTP::WebTest is supposed to handle. Yet it should be possible to do but anyway I think it is wrong approach. If you want the other way of running individual tests you can run them manually via method run_test(). This method runs individual test (opposed to running whole test sequence with run_tests()). In this case you have full control on forming test queue. Anyway if you need more specific advice show your code. -- Ilya Martynov (http://martynov.org/) |
From: Paul H. <Pau...@Ti...> - 2002-09-04 00:48:51
|
Ilya, I am working on a problem that you may have already given some thought to. I'm trying to come up with a plugin that loops through a series of pages that are templated, testing each to see if it meets the qualifications and if so, rewritting the URL to get the next. An example would be a search engine result, where the number of iterations are unknown going into the test. I have been able to mangle some code to get the looping to happen, but I get hung up on how to integrate the test results so that they report the correct URL for each one and get loaded on the stack in the correct order ( right now I am getting the outer test first, then the one from the loop in the reverse order.) Right now my code is in an embarrassing state with print statements everywhere, so if you are would like me to show you what I mean, I will clean it up before I let it air in public. Anyway - no concrete questions, just wondering if this is something anyone has worked on ... -- Paul Hamingson QA Engineer Ticketmaster-Online |
From: William M. <wi...@kn...> - 2002-08-29 14:16:55
|
On 29 Aug 2002 at 17:41, Ilya Martynov wrote: > With latest HTTP::WebTest you can write tests as > > plugins = ( ::Hooks ) > > on_start = { $URL = 'http://domain' } That works! > BTW I had an idea to implement relative links too. I see we're thinking along the same lines then. For now, the above works just as well. Cheers! William -- Lead Developer Knowmad Services Inc. || Internet Applications & Database Integration http://www.knowmad.com |
From: Ilya M. <il...@ma...> - 2002-08-29 13:42:00
|
>>>>> 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/) |
From: William M. <wi...@kn...> - 2002-08-29 13:20:26
|
Hi all, I have been using Webtest to test my scripts on a test server. Now that they have moved over to the production server, I find that I need to change all of my url entries. Easy enough with a good editor, but it seems like there should be a way to globally define the url. Then I realized that if Webtest can handle cookies, it can perhaps handle relative links so that I do not need to reenter the absolute url after my first test case. Aspiring to the Perl virtue of laziness, I thought I'd throw this idea out to the list before going off to test it myself. Thanks for your suggestions or feedback, William -- Lead Developer Knowmad Services Inc. || Internet Applications & Database Integration http://www.knowmad.com |
From: Ilya M. <il...@ma...> - 2002-08-22 09:24:15
|
The URL http://martynov.org/tgz/HTTP-WebTest-1.99_09.tar.gz has entered CPAN as file: $CPAN/authors/id/I/IL/ILYAM/HTTP-WebTest-1.99_09.tar.gz size: 95060 bytes md5: a3ed9d9e403f4a9b78494292be73c3a2 NAME HTTP::WebTest - Test remote URLs or local web files DESCRIPTION This module runs tests on remote URLs or local web files containing Perl/JSP/HTML/JavaScript/etc. and generates a detailed test report. This module can be used "as-is" or its functionality can be extended using plugins. Plugins can define test types and provide additional report capabilities. This module comes with a set of default plugins but can be easily extended with third party plugins. 1.99_09 Thu Aug 22 2002 ENHANCEMENTS: * New core test parameter 'status_code' which allows to test HTTP responses for non-OK (200) status codes. Thanks to Paul Hamingson for implementation. * New core test parameter 'handle_redirects' which allows to disable optionally automatic handling of redirects by HTTP-WebTest. * New test parameter 'form_name' in HTTP::WebTest::Plugin::Click plugin. Thanks to Paul Hamingson for patch. * Test parameter 'click_button' in HTTP::WebTest::Plugin::Click plugin now supports image buttons (i.e. <input type="image" ...>). Thanks to Paul Hamingson for patch. * Added two test parameters 'on_start' and 'on_finish' to HTTP::WebTest::Plugin::Hook plugin. * Extended example 'User-Defined Tests' in Cookbook. Suggested by William McKee. BUG FIXES: * Previously comments inside of list parameters in wtscript files was not allowed. Reported by William McKee. * Fixed 'make test' failure on Perl 5.8.0. -- Ilya Martynov (http://martynov.org/) |