http-webtest-general Mailing List for HTTP-WebTest (Page 4)
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...> - 2004-03-11 07:05:40
|
On Wed, Mar 10, 2004 at 10:00:00PM -0800, Carlos Ramirez wrote: > What's the best approach to checking links in a document. For instance I > want to load a page then gather all links in the document an issue HEAD > requests to test that all links work. I started writing a > HTTP::WebTest::Plugins::LinksTest.pm module that would allow Hi Carlos, Currently I'm using linklint[1] to do my link checking. However, I have not integrated it in any way with automated testing. I'd be very happy to have such a plug-in available for HTTP::WebTest. Let me know if you need any help with testing. Cheers! William [1] http://www.linklint.org/ -- Knowmad Services Inc. http://www.knowmad.com |
From: Carlos R. <cra...@gt...> - 2004-03-11 06:01:16
|
What's the best approach to checking links in a document. For instance I want to load a page then gather all links in the document an issue HEAD requests to test that all links work. I started writing a HTTP::WebTest::Plugins::LinksTest.pm module that would allow test_name = Home page url = http://a.url.com/ check_links = yes end_test Is a module overkill, or does this functionality already exist? I'm aware of click_link, but you have to know the name of links. Thanks, -Carlos |
From: Cavanaugh, D. <dca...@uc...> - 2004-03-10 21:43:04
|
Would you send me a simple ssl example? For instance: connect to https://mail.yoo.com and fill in any values for the Yahoo ID and password, then click "Sign in". Just something that illustrates the basic mechanics. Thanks. |
From: William M. <wi...@kn...> - 2004-03-10 12:11:06
|
On Wed, Mar 10, 2004 at 01:32:11PM +0530, Archana Gudi wrote: > Here i tried all combinations of (file,filename,header) i.e. using all 3 > or 1 or two parameters for variable 'secrets'. It is not loading file. > Only once it worked fine in some 100 trials. But unable to get it again > working. Hi Archana, I have not had the need to try out this portion of HTTP::WebTest so cannot offer you a quick solution. Hopefully Ilya will respond with some suggestions, but I haven't seen him much on the list lately. If you don't hear from anyone, I suggest that you build a sample application and test which repeats the problem. If you upload these files to the list, I will test it. Often in the process of creating a repeatable test, I come across the error in the original application. Good luck, William -- Knowmad Services Inc. http://www.knowmad.com |
From: Archana G. <ar...@te...> - 2004-03-10 08:21:10
|
On Wed, 2004-03-10 at 09:19, Archana Gudi wrote: > > Hi, > > I want to upload a file 'sample.txt' on to DUT using HTTP webtest perl > > functions. > > > > I have a function to do this which has something like this.... > > > > > > > > params =>[ > > number =>$index, > > enable =>$state, > > id =>$peer, > > auth =>$method, > > network =>$wan, > > conn_number =>$cindex, > > secrets =>[ > > '/home/user/sample.txt', > > 'sample.txt', > > # Accept=>'text/plain' > > ] > > > > > > Here i tried all combinations of (file,filename,header) i.e. using all 3 > > or 1 or two parameters for variable 'secrets'. It is not loading file. > > Only once it worked fine in some 100 trials. But unable to get it again > > working. > > > > But if i do it manually using mozilla browser it goes through. > > > > > > > > Please help me resolving this problem. > > > > thanks and regards, > > Archana > > > > > > > |
From: William M. <wi...@kn...> - 2004-03-05 19:11:32
|
> When I run it in Unix, I got error message said: Hi Hong, What line-endings does your wt file have? I had no problem with the sample script. William -- Knowmad Services Inc. http://www.knowmad.com |
From: Cao, H. (NIH/NCI) <ca...@ma...> - 2004-03-05 17:09:28
|
Hi, I'm new in HTTP::WebTest. I copied the following code and save as a wt file. plugins = ( ::Click ) test_name = First page url = http://martynov.org/ text_require = ( Ilya Martynov's Web Site ) end_test test_name = Mail-CheckUser page click_link = Mail-CheckUser text_require = ( Mail-CheckUser Download ) regex_require = ( Mail-CheckUser-[\d\.]+\.tar\.gz ) end_test When I run it in Unix, I got error message said: HTTP::WebTest: wtscript parsing error Line 13 near 'end_test': Test parameter or end_test is expected If I only run "First page" test, code works fine. So, any body can tell me why the click_link doesn't work? How I fix it? Thanks, Hong Cao Laboratory of Molecular Pharmacology Building 37, Room 5068 37 Convent DR MSC 4255 Bethesda, MD 20892-4255 |
From: Cao, H. (NIH/NCI) <ca...@ma...> - 2004-02-26 20:39:49
|
Hi All, I just installed HTTP::WebTest module and tried to run the example code to test yahoo home page. I got the error message as following: Failed Succeeded Test Name 3 1 Yahoo home page Test Name: Yahoo home page URL: http://www.yahoo.com STATUS CODE CHECK Expected '200' and got: 500 Can't locate HTML/Parser.pm in FAIL REQUIRED TEXT <a href=r/qt>Quotations</a>...<br> FAIL CONTENT SIZE CHECK Number of returned bytes ( 0 ) is > or = 13000 ? FAIL Number of returned bytes ( 0 ) is < or = 99000 ? SUCCEED Total web tests failed: 3 succeeded: 1 HTTP::WebTest: mail error for command mail: 5.5.4 <hong>... Domain name required for sender address hong Thanks, Hong Cao Laboratory of Molecular Pharmacology Building 37, Room 5068 37 Convent DR MSC 4255 Bethesda, MD 20892-4255 |
From: Ben K. <ben...@hi...> - 2004-02-02 22:42:43
|
> Hi Ben, > > It seems that you sent the working example. Can you send over an example > that is failing? > > William > Hi William, Something like the following should work and doesn't. my @example; push @example, ({ test_name = get url, url = http://some.url.com, }, { test_name = perform_test, click_link = 'some link', text_require = 'some text', }); #assuming $webtest has been instantiated $webtest->run_tests(\@example); |
From: William M. <wi...@kn...> - 2004-02-02 17:31:30
|
On Mon, Feb 02, 2004 at 01:34:28PM +1100, Ben Kelly wrote: > It seems that when using the run_tests method with an array, the URL is not > remembered from test to test. Tests that work fine in .wt script format fail > when run from an array in perl. The error 'the requested uri is not set' > raises its ugly head once more. Hi Ben, It seems that you sent the working example. Can you send over an example that is failing? William -- Knowmad Services Inc. http://www.knowmad.com |
From: Ben K. <ben...@hi...> - 2004-02-02 02:25:48
|
It seems that when using the run_tests method with an array, the URL is not remembered from test to test. Tests that work fine in .wt script format fail when run from an array in perl. The error 'the requested uri is not set' raises its ugly head once more. A simple example would be test_name = get url url = http://some.url.com end_test test_name = perform_test click_link = 'some link' text_require = 'some text' end_test As a .wt script, there is no problem. As a perl array it barfs. Can anyone suggest why this might be, or even better a solution (that doesn't involve using a static .wt file)? Cheers. -Ben |
From: Ilya M. <il...@ip...> - 2004-01-14 10:36:43
|
>>>>> "BK" == Ben Kelly <ben...@hi...> writes: BK> I'm attempting to set up a script to run an arbitrary number of tests as BK> defined by the output of the program feeding into it. BK> I am generating each test similarly to: BK> foreach $i (@some_array) BK> { BK> $test = { url => 'someurl', text_require => [ $i ] }; BK> } BK> I could run each test directly after it's generated by putting BK> $wt->run_tests($test); BK> inside the loop, however I will also be adding code to email me should tests BK> fail. There are potentially a lot of tests and rather than spam myself, I'd BK> like to combine all of these tests into an array and run them all at once BK> with the results collated into one email. BK> The problem I'm having is combining the tests such that they work with the BK> run_tests method. Combining them directly into an array (ie @array = BK> (@array, $test); ) and then passing the array ref to run_tests does not BK> work. I suppose I could cram them into a scalar and use run_wtscript, but BK> I'd really rather not if it can be helped. Hopefully there's something BK> simple that I'm overlooking. BK> Any suggestions welcomed. Hmm, why combaining tests into an array doesn't work? Can you show an example? Taking your example code I don't see why following shouldn't work: my @tests; foreach $i (@some_array) { push @tests, { url => 'someurl', text_require => [ $i ] }; } $wt->run_tests(\@tests); -- 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: Ben K. <ben...@hi...> - 2004-01-13 06:08:21
|
I'm attempting to set up a script to run an arbitrary number of tests as defined by the output of the program feeding into it. I am generating each test similarly to: foreach $i (@some_array) { $test = { url => 'someurl', text_require => [ $i ] }; } I could run each test directly after it's generated by putting $wt->run_tests($test); inside the loop, however I will also be adding code to email me should tests fail. There are potentially a lot of tests and rather than spam myself, I'd like to combine all of these tests into an array and run them all at once with the results collated into one email. The problem I'm having is combining the tests such that they work with the run_tests method. Combining them directly into an array (ie @array = (@array, $test); ) and then passing the array ref to run_tests does not work. I suppose I could cram them into a scalar and use run_wtscript, but I'd really rather not if it can be helped. Hopefully there's something simple that I'm overlooking. Any suggestions welcomed. |
From: Ilya M. <il...@ip...> - 2003-12-30 13:36:30
|
>>>>> "BK" == Ben Kelly <ben...@hi...> writes: BK> Getting the following error trying to buffer HTML output as per the 'on BK> response problem' thread. BK> HTTP::WebTest: request uri is not set at /somepath/WebTest/API.pm line 567. BK> The source code is close enough to Ilya's response in that thread as to be BK> identical. Tracing it back, I'm not exactly sure why this error is cropping BK> up. Comments? Suggestions? Derisive laughter? ;-) (either of the first two, BK> greatly appreciated) This rather criptic error message means that either you don't have 'url' parameter or you use click plugin and it cannot find link/button to click. In other words HTTP::WebTest doesn't know which page to request. -- 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: Ben K. <ben...@hi...> - 2003-12-29 22:50:57
|
Getting the following error trying to buffer HTML output as per the 'on response problem' thread. HTTP::WebTest: request uri is not set at /somepath/WebTest/API.pm line 567. The source code is close enough to Ilya's response in that thread as to be identical. Tracing it back, I'm not exactly sure why this error is cropping up. Comments? Suggestions? Derisive laughter? ;-) (either of the first two, greatly appreciated) ----- Original Message ----- From: <htt...@li...> To: <htt...@li...> Sent: Monday, December 29, 2003 3:09 PM Subject: Http-webtest-general digest, Vol 1 #139 - 4 msgs > Send Http-webtest-general mailing list submissions to > htt...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/http-webtest-general > or, via email, send a message with subject or body 'help' to > htt...@li... > > You can reach the person managing the list at > htt...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Http-webtest-general digest..." > > > Today's Topics: > > 1. URL mangling (Ben Kelly) > 2. Re: URL mangling (Srdjan) > 3. Re: URL mangling (Ben Kelly) > 4. Re: URL mangling (Srdjan) > > --__--__-- > > Message: 1 > From: "Ben Kelly" <ben...@hi...> > To: <htt...@li...> > Date: Mon, 29 Dec 2003 11:50:43 +1100 > Subject: [Http-webtest-general] URL mangling > > Using webtest to check responses from filling in a form. > The authentication test works fine. The second test however, returns a URL > that is different from the one specified. Using show_cookies appears to > indicate that they're not an issue. If I simply navigate to the specified > URL there are no problems. Adding parameters and the command to search > however, causes the problem. The URL changes from > http://www.hitwise.com.au/newswise/search.html > to > http://www.hitwise.com.au/profiler/index.html (with the specified parameters > appended) > > Can anyone shed some light as to why this might be happening? > Relevant code below: > > > > plugins = ( ::Click > ::Hooks ) > > > test_name = AUTH > url = http://www.hitwise.com.au/login/index.html > cookies = ( [snipped cookie stuff ] ) > click_button = Login > params = (name => <name> > pass => <password> ) > text_require = ( Welcome ) > end_test > > test_name = CHECKMEDIA > url = http://www.hitwise.com.au/newswise/search.html > method = GET > click_button = Search! > params = ( q => Japan > qfield => all > date_limit_type => recent > age_max => 7 > include_syndicated => no > source_limit => none > action => search > page => 1 ) > text_require = ( color: dd5800 ) > end_test > > > > --__--__-- > > Message: 2 > Date: Mon, 29 Dec 2003 14:27:35 +1300 > From: Srdjan <sr...@ca...> > To: Ben Kelly <ben...@hi...> > CC: htt...@li... > Subject: Re: [Http-webtest-general] URL mangling > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I believe that you're not supposed to use click_button together with url. Click > button simulates clicking a button on the _previous_ test response page, and I'm > not sure what exactly happens when you have both click_button and url specified > (maybe Ilya can answer that). From what I can see you don't use click_button as > intended (but I may be wrong, of course). Do you actually mean something like > > test_name = HOME > ~ url = http://www.hitwise.com.au/login/index.html > end_test > > test_name = AUTH > ~ click_button = Login > ~ params = (name => <name> > ~ pass => <password> ) > ~ text_require = ( Welcome ) > end_test > > test_name = CHECKMEDIA > ~ click_button = Search! > ~ params = ( q => Japan > ~ qfield => all > ~ date_limit_type => recent > ~ age_max => 7 > ~ include_syndicated => no > ~ source_limit => none > ~ action => search > ~ page => 1 ) > ~ text_require = ( color: dd5800 ) > end_test > > > Srdjan > > Ben Kelly wrote: > | Using webtest to check responses from filling in a form. > | The authentication test works fine. The second test however, returns a URL > | that is different from the one specified. Using show_cookies appears to > | indicate that they're not an issue. If I simply navigate to the specified > | URL there are no problems. Adding parameters and the command to search > | however, causes the problem. The URL changes from > | http://www.hitwise.com.au/newswise/search.html > | to > | http://www.hitwise.com.au/profiler/index.html (with the specified parameters > | appended) > | > | Can anyone shed some light as to why this might be happening? > | Relevant code below: > | > | > | > | plugins = ( ::Click > | ::Hooks ) > | > | > | test_name = AUTH > | url = http://www.hitwise.com.au/login/index.html > | cookies = ( [snipped cookie stuff ] ) > | click_button = Login > | params = (name => <name> > | pass => <password> ) > | text_require = ( Welcome ) > | end_test > | > | test_name = CHECKMEDIA > | url = http://www.hitwise.com.au/newswise/search.html > | method = GET > | click_button = Search! > | params = ( q => Japan > | qfield => all > | date_limit_type => recent > | age_max => 7 > | include_syndicated => no > | source_limit => none > | action => search > | page => 1 ) > | text_require = ( color: dd5800 ) > | end_test > | > | > | > | ------------------------------------------------------- > | This SF.net email is sponsored by: IBM Linux Tutorials. > | Become an expert in LINUX or just sharpen your skills. Sign up for IBM's > | Free Linux Tutorials. Learn everything from the bash shell to sys admin. > | Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > | _______________________________________________ > | Http-webtest-general mailing list > | Htt...@li... > | https://lists.sourceforge.net/lists/listinfo/http-webtest-general > | > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.3 (GNU/Linux) > Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org > > iD8DBQE/74MHX4ZD19jq88YRAqc0AKCQVIDqZc6vC17XdJUr0RpxiwleMACZAWfM > 5cXjj9c79QshkEgCTM+jtro= > =iuUa > -----END PGP SIGNATURE----- > > > --__--__-- > > Message: 3 > From: "Ben Kelly" <ben...@hi...> > To: "Srdjan" <sr...@ca...> > Cc: <htt...@li...> > Subject: Re: [Http-webtest-general] URL mangling > Date: Mon, 29 Dec 2003 13:25:34 +1100 > > Yep, that seems to work. Looks like my understanding of those methods was > fundamentally flawed. Is there a way to use them simultaneously without > having to resort to a dummy test to grab the page you wanted before > manipulating it? > Thanks for your help. > > ----- Original Message ----- > From: "Srdjan" <sr...@ca...> > To: "Ben Kelly" <ben...@hi...> > Cc: <htt...@li...> > Sent: Monday, December 29, 2003 12:27 PM > Subject: Re: [Http-webtest-general] URL mangling > > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > I believe that you're not supposed to use click_button together with url. > Click > > button simulates clicking a button on the _previous_ test response page, > and I'm > > not sure what exactly happens when you have both click_button and url > specified > > (maybe Ilya can answer that). From what I can see you don't use > click_button as > > intended (but I may be wrong, of course). Do you actually mean something > like > > > > test_name = HOME > > ~ url = http://www.hitwise.com.au/login/index.html > > end_test > > > > test_name = AUTH > > ~ click_button = Login > > ~ params = (name => <name> > > ~ pass => <password> ) > > ~ text_require = ( Welcome ) > > end_test > > > > test_name = CHECKMEDIA > > ~ click_button = Search! > > ~ params = ( q => Japan > > ~ qfield => all > > ~ date_limit_type => recent > > ~ age_max => 7 > > ~ include_syndicated => no > > ~ source_limit => none > > ~ action => search > > ~ page => 1 ) > > ~ text_require = ( color: dd5800 ) > > end_test > > > > > > Srdjan > > > > --__--__-- > > Message: 4 > Date: Mon, 29 Dec 2003 15:38:00 +1300 > From: Srdjan <sr...@ca...> > To: Ben Kelly <ben...@hi...> > CC: htt...@li... > Subject: Re: [Http-webtest-general] URL mangling > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Well, if you whant to manipulate something you have to grab it first, otherwise > what is there to manipulate :) > > You can easily specify submit url and params, thus cutting out the middle man. > But sometimes you need cookies set up beforehand. I use HTTP::WebTest > exclusively as regression scenario testing (although I can see its value as a > live site health checking tool), and I prefer going exactly through the steps a > punter is supposed to make in order to do/get something. > So in your case something like > > test_name = AUTH > ~ url = http://www.hitwise.com.au/login/index.html > ~ params = (name => <name> > ~ pass => <password> ) > ~ text_require = ( Welcome ) > end_test > > should work, presuming that http://www.hitwise.com.au/login/index.html is the > login action url > > > Srdjan > > > Ben Kelly wrote: > | Yep, that seems to work. Looks like my understanding of those methods was > | fundamentally flawed. Is there a way to use them simultaneously without > | having to resort to a dummy test to grab the page you wanted before > | manipulating it? > | Thanks for your help. > | > | ----- Original Message ----- > | From: "Srdjan" <sr...@ca...> > | To: "Ben Kelly" <ben...@hi...> > | Cc: <htt...@li...> > | Sent: Monday, December 29, 2003 12:27 PM > | Subject: Re: [Http-webtest-general] URL mangling > | > | > | > |>-----BEGIN PGP SIGNED MESSAGE----- > |>Hash: SHA1 > |> > |>I believe that you're not supposed to use click_button together with url. > | > | Click > | > |>button simulates clicking a button on the _previous_ test response page, > | > | and I'm > | > |>not sure what exactly happens when you have both click_button and url > | > | specified > | > |>(maybe Ilya can answer that). From what I can see you don't use > | > | click_button as > | > |>intended (but I may be wrong, of course). Do you actually mean something > | > | like > | > |>test_name = HOME > |>~ url = http://www.hitwise.com.au/login/index.html > |>end_test > |> > |>test_name = AUTH > |>~ click_button = Login > |>~ params = (name => <name> > |>~ pass => <password> ) > |>~ text_require = ( Welcome ) > |>end_test > |> > |>test_name = CHECKMEDIA > |>~ click_button = Search! > |>~ params = ( q => Japan > |>~ qfield => all > |>~ date_limit_type => recent > |>~ age_max => 7 > |>~ include_syndicated => no > |>~ source_limit => none > |>~ action => search > |>~ page => 1 ) > |>~ text_require = ( color: dd5800 ) > |>end_test > |> > |> > |>Srdjan > | > | > | > | > | ------------------------------------------------------- > | This SF.net email is sponsored by: IBM Linux Tutorials. > | Become an expert in LINUX or just sharpen your skills. Sign up for IBM's > | Free Linux Tutorials. Learn everything from the bash shell to sys admin. > | Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > | _______________________________________________ > | Http-webtest-general mailing list > | Htt...@li... > | https://lists.sourceforge.net/lists/listinfo/http-webtest-general > | > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.3 (GNU/Linux) > Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org > > iD8DBQE/75OIX4ZD19jq88YRAuaMAJwJW5Cv/b84vzywu4mM9kEFK97TMwCfdtvV > El068Slah3RWnQ0qPD2RgWg= > =r/4y > -----END PGP SIGNATURE----- > > > > --__--__-- > > _______________________________________________ > Http-webtest-general mailing list > Htt...@li... > https://lists.sourceforge.net/lists/listinfo/http-webtest-general > > > End of Http-webtest-general Digest > > |
From: Srdjan <sr...@ca...> - 2003-12-29 02:38:09
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Well, if you whant to manipulate something you have to grab it first, otherwise what is there to manipulate :) You can easily specify submit url and params, thus cutting out the middle man. But sometimes you need cookies set up beforehand. I use HTTP::WebTest exclusively as regression scenario testing (although I can see its value as a live site health checking tool), and I prefer going exactly through the steps a punter is supposed to make in order to do/get something. So in your case something like test_name = AUTH ~ url = http://www.hitwise.com.au/login/index.html ~ params = (name => <name> ~ pass => <password> ) ~ text_require = ( Welcome ) end_test should work, presuming that http://www.hitwise.com.au/login/index.html is the login action url Srdjan Ben Kelly wrote: | Yep, that seems to work. Looks like my understanding of those methods was | fundamentally flawed. Is there a way to use them simultaneously without | having to resort to a dummy test to grab the page you wanted before | manipulating it? | Thanks for your help. | | ----- Original Message ----- | From: "Srdjan" <sr...@ca...> | To: "Ben Kelly" <ben...@hi...> | Cc: <htt...@li...> | Sent: Monday, December 29, 2003 12:27 PM | Subject: Re: [Http-webtest-general] URL mangling | | | |>-----BEGIN PGP SIGNED MESSAGE----- |>Hash: SHA1 |> |>I believe that you're not supposed to use click_button together with url. | | Click | |>button simulates clicking a button on the _previous_ test response page, | | and I'm | |>not sure what exactly happens when you have both click_button and url | | specified | |>(maybe Ilya can answer that). From what I can see you don't use | | click_button as | |>intended (but I may be wrong, of course). Do you actually mean something | | like | |>test_name = HOME |>~ url = http://www.hitwise.com.au/login/index.html |>end_test |> |>test_name = AUTH |>~ click_button = Login |>~ params = (name => <name> |>~ pass => <password> ) |>~ text_require = ( Welcome ) |>end_test |> |>test_name = CHECKMEDIA |>~ click_button = Search! |>~ params = ( q => Japan |>~ qfield => all |>~ date_limit_type => recent |>~ age_max => 7 |>~ include_syndicated => no |>~ source_limit => none |>~ action => search |>~ page => 1 ) |>~ text_require = ( color: dd5800 ) |>end_test |> |> |>Srdjan | | | | | ------------------------------------------------------- | This SF.net email is sponsored by: IBM Linux Tutorials. | Become an expert in LINUX or just sharpen your skills. Sign up for IBM's | Free Linux Tutorials. Learn everything from the bash shell to sys admin. | Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click | _______________________________________________ | Http-webtest-general mailing list | Htt...@li... | https://lists.sourceforge.net/lists/listinfo/http-webtest-general | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQE/75OIX4ZD19jq88YRAuaMAJwJW5Cv/b84vzywu4mM9kEFK97TMwCfdtvV El068Slah3RWnQ0qPD2RgWg= =r/4y -----END PGP SIGNATURE----- |
From: Ben K. <ben...@hi...> - 2003-12-29 02:18:59
|
Yep, that seems to work. Looks like my understanding of those methods was fundamentally flawed. Is there a way to use them simultaneously without having to resort to a dummy test to grab the page you wanted before manipulating it? Thanks for your help. ----- Original Message ----- From: "Srdjan" <sr...@ca...> To: "Ben Kelly" <ben...@hi...> Cc: <htt...@li...> Sent: Monday, December 29, 2003 12:27 PM Subject: Re: [Http-webtest-general] URL mangling > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I believe that you're not supposed to use click_button together with url. Click > button simulates clicking a button on the _previous_ test response page, and I'm > not sure what exactly happens when you have both click_button and url specified > (maybe Ilya can answer that). From what I can see you don't use click_button as > intended (but I may be wrong, of course). Do you actually mean something like > > test_name = HOME > ~ url = http://www.hitwise.com.au/login/index.html > end_test > > test_name = AUTH > ~ click_button = Login > ~ params = (name => <name> > ~ pass => <password> ) > ~ text_require = ( Welcome ) > end_test > > test_name = CHECKMEDIA > ~ click_button = Search! > ~ params = ( q => Japan > ~ qfield => all > ~ date_limit_type => recent > ~ age_max => 7 > ~ include_syndicated => no > ~ source_limit => none > ~ action => search > ~ page => 1 ) > ~ text_require = ( color: dd5800 ) > end_test > > > Srdjan |
From: Srdjan <sr...@ca...> - 2003-12-29 01:28:05
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I believe that you're not supposed to use click_button together with url. Click button simulates clicking a button on the _previous_ test response page, and I'm not sure what exactly happens when you have both click_button and url specified (maybe Ilya can answer that). From what I can see you don't use click_button as intended (but I may be wrong, of course). Do you actually mean something like test_name = HOME ~ url = http://www.hitwise.com.au/login/index.html end_test test_name = AUTH ~ click_button = Login ~ params = (name => <name> ~ pass => <password> ) ~ text_require = ( Welcome ) end_test test_name = CHECKMEDIA ~ click_button = Search! ~ params = ( q => Japan ~ qfield => all ~ date_limit_type => recent ~ age_max => 7 ~ include_syndicated => no ~ source_limit => none ~ action => search ~ page => 1 ) ~ text_require = ( color: dd5800 ) end_test Srdjan Ben Kelly wrote: | Using webtest to check responses from filling in a form. | The authentication test works fine. The second test however, returns a URL | that is different from the one specified. Using show_cookies appears to | indicate that they're not an issue. If I simply navigate to the specified | URL there are no problems. Adding parameters and the command to search | however, causes the problem. The URL changes from | http://www.hitwise.com.au/newswise/search.html | to | http://www.hitwise.com.au/profiler/index.html (with the specified parameters | appended) | | Can anyone shed some light as to why this might be happening? | Relevant code below: | | | | plugins = ( ::Click | ::Hooks ) | | | test_name = AUTH | url = http://www.hitwise.com.au/login/index.html | cookies = ( [snipped cookie stuff ] ) | click_button = Login | params = (name => <name> | pass => <password> ) | text_require = ( Welcome ) | end_test | | test_name = CHECKMEDIA | url = http://www.hitwise.com.au/newswise/search.html | method = GET | click_button = Search! | params = ( q => Japan | qfield => all | date_limit_type => recent | age_max => 7 | include_syndicated => no | source_limit => none | action => search | page => 1 ) | text_require = ( color: dd5800 ) | end_test | | | | ------------------------------------------------------- | This SF.net email is sponsored by: IBM Linux Tutorials. | Become an expert in LINUX or just sharpen your skills. Sign up for IBM's | Free Linux Tutorials. Learn everything from the bash shell to sys admin. | Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click | _______________________________________________ | Http-webtest-general mailing list | Htt...@li... | https://lists.sourceforge.net/lists/listinfo/http-webtest-general | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQE/74MHX4ZD19jq88YRAqc0AKCQVIDqZc6vC17XdJUr0RpxiwleMACZAWfM 5cXjj9c79QshkEgCTM+jtro= =iuUa -----END PGP SIGNATURE----- |
From: Ben K. <ben...@hi...> - 2003-12-29 00:44:15
|
Using webtest to check responses from filling in a form. The authentication test works fine. The second test however, returns a URL that is different from the one specified. Using show_cookies appears to indicate that they're not an issue. If I simply navigate to the specified URL there are no problems. Adding parameters and the command to search however, causes the problem. The URL changes from http://www.hitwise.com.au/newswise/search.html to http://www.hitwise.com.au/profiler/index.html (with the specified parameters appended) Can anyone shed some light as to why this might be happening? Relevant code below: plugins = ( ::Click ::Hooks ) test_name = AUTH url = http://www.hitwise.com.au/login/index.html cookies = ( [snipped cookie stuff ] ) click_button = Login params = (name => <name> pass => <password> ) text_require = ( Welcome ) end_test test_name = CHECKMEDIA url = http://www.hitwise.com.au/newswise/search.html method = GET click_button = Search! params = ( q => Japan qfield => all date_limit_type => recent age_max => 7 include_syndicated => no source_limit => none action => search page => 1 ) text_require = ( color: dd5800 ) end_test |
From: William M. <wi...@kn...> - 2003-12-18 02:02:04
|
On Thu, Dec 18, 2003 at 01:22:30PM +1300, Srdjan wrote: > Well, if you are running it from a perl script, then you can use fh_out > param, and if you are not, than you can always do > wt test.wt > wherever Thanks Srdjan! The fh_out was exactly what I needed. I had been using the redirect before converting to the Test::Harness plugin. Cheers! William -- Knowmad Services Inc. http://www.knowmad.com |
From: Srdjan <sr...@ca...> - 2003-12-18 00:22:39
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Well, if you are running it from a perl script, then you can use fh_out param, and if you are not, than you can always do wt test.wt > wherever Cheers, Srdjan William McKee wrote: | Hi list, | | I was just reading up on WWW::Mechanize recently and tried it out | because I'm on a mission of improving my testing framework. Mech has | some nice features but when it comes to testing web applications, it | appears to be lacking the ease of setup that WebTest has. | | So, I began to look into hooking WebTest into my make test command. Ilya | has already beat me to it and even provided a recipe for making it | happen. Now I can call all of my individual webtest scripts from a | single test file. Very nice! | | Now, I'm wondering if there is a way to divert output to a separate log | file so that I can keep my default report on but not writing it to | STDOUT. This ability comes in handy when I'm doing my testing and | revisions. | | Thanks, | William | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQE/4PNFX4ZD19jq88YRApuHAJwLeNZmpZEXHrFWbooynPrX+ZGJWACgjcD9 RrKYIgPXOKDJl4LBkdckERM= =kJkZ -----END PGP SIGNATURE----- |
From: William M. <wi...@kn...> - 2003-12-17 23:49:49
|
Hi list, I was just reading up on WWW::Mechanize recently and tried it out because I'm on a mission of improving my testing framework. Mech has some nice features but when it comes to testing web applications, it appears to be lacking the ease of setup that WebTest has. So, I began to look into hooking WebTest into my make test command. Ilya has already beat me to it and even provided a recipe for making it happen. Now I can call all of my individual webtest scripts from a single test file. Very nice! Now, I'm wondering if there is a way to divert output to a separate log file so that I can keep my default report on but not writing it to STDOUT. This ability comes in handy when I'm doing my testing and revisions. Thanks, William -- Knowmad Services Inc. http://www.knowmad.com |
From: Srdjan <sr...@ca...> - 2003-12-03 04:18:42
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I've just started to play with HTTP::WebTest, and immediately realised that I need a plugin that will select a random value from a form. Has anyone done anything similar, I always feel kind of silly when I reinvent the wheel. Cheers, Srdjan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQE/zWQcX4ZD19jq88YRAhIbAJ4iROEAjpzvX/DbAaXs2iWt4zonLQCeL2Dz lNZtQt0UXa/AiXp1Vq74dcY= =wMoA -----END PGP SIGNATURE----- |
From: Ilya M. <il...@ip...> - 2003-11-28 12:04:12
|
>>>>> "A" == archana <ar...@am...> writes: A> Hi, A> When i post a method to a gui application, if i enable 'show_html' A> option i can see the html page contents on screen. A> How can i get them in a buffer? A> I want the entire html response in a buffer so that i can process it A> further and use the data for my subsequent tests. You can use on_response to catch content in some perl variable (untested) plugins = ( ::Hooks ) test_name = Getting content ... on_response = { my $webtest = shift; # gets whole content of HTTP response my $content = $webtest->current_response->content; # extracting what you want from HTML with *very* crude regexp - # you may want to use some HTML parser here instead # (XML::LibXML, HTML::Parser, etc) ($RATE) = $content =~ /Upstream Rate \(fast mode\).*<td>(.*?)</td>/ return []; } end_test ... test_name = Using extracted value # lets use extracted rate in, say, text_require check text_require = ( "$RATE" ) end_test A> Following is the sample response A> [..snip..] -- 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: archana <ar...@am...> - 2003-11-27 09:52:41
|
Hi, When i post a method to a gui application, if i enable 'show_html' option i can see the html page contents on screen. How can i get them in a buffer? I want the entire html response in a buffer so that i can process it further and use the data for my subsequent tests. Following is the sample response --------------------------------- PAGE CONTENT: <html><head><link rel=stylesheet href=/custom.css> <META HTTP-EQUIV = "Pragma" CONTENT="no-cache"> <META HTTP-EQUIV = "Cache-Control" CONTENT="no-cache"> <META HTTP-EQUIV = "Expires" CONTENT="0"> <script language="javascript"> function doLoad() { setTimeout("refresh()", 5*1000); } function refresh() { this.location.href="/cgi-bin/GConfigure?script=5&1"; } </script> </head> <body onload="doLoad();"> <h1>ADSL State</h1> <table width=600px> <tr><th align=left width=300px>DMT Software Version</th><td align=left> version 1.00.04 R1.19.7 MCONF-HPF2-5D5V</td></tr> <tr><th align=left width=300px>State</th><td align=left>activating</td></tr> <tr><th align=left width=300px>Mode</th><td align=left>n/a </td></tr> <tr><th align=left width=300px>Upstream Rate (interleaved mode)</th><td>n/a Kbps</td></tr> <tr><th align=left width=300px>Upstream Rate (fast mode)</th><td>n/a Kbps</td></tr> <tr><th align=left width=300px>Downstream Rate (interleaved mode)</th><td>n/a Kbps</td></tr> <tr><th align=left width=300px>Downstream Rate (fast mode)</th><td>n/a Kbps</td></tr> <tr><th align=left width=300px>Upstream SNR</th><td>n/a dB</td></tr> <tr><th align=left width=300px>DownStream SNR</th><td>n/a dB</td></tr> <tr><th align=left width=300px>Upstream Cell Rate (interleaved mode)</th><td>Total n/a (active n/a) CPS</td></tr> <tr><th align=left width=300px>Upstream Cell Rate (fast mode)</th><td>Total n/a (active n/a) CPS</td></tr> <tr><th align=left width=300px>Downstream Cell Rate (interleaved mode)</th><td>Total n/a (active n/a) CPS</td></tr> <tr><th align=left width=300px>Downstream Cell Rate (fast mode)</th><td>Total n/a (active n/a) CPS</td></tr> <tr><th align=left width=300px>CRC Counts</th><td>n/a</td></tr> <tr><td><a href=/cgi-bin/GConfigure?script=5&2 target=main>Reset CRC counters</a></td></tr> </table> <br> <br><a href="/cgi-bin/GConfigure?script=5&0" target="main">Refresh</a> </body></html> ------------------------------------------------------------------------------------------------------------------------ How can i get Upstream Rate (fast mode) using this? Help me in this please, thanks and regards, Archana -- archana <ar...@am...> AmpleWave Communication Networks |