http-webtest-general Mailing List for HTTP-WebTest (Page 2)
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: Srdjan <sr...@ca...> - 2004-06-02 07:05:24
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Then you're out of luck. I mean if you're depending on JavaScript to do whatever in the on_submit() handler. I know of no non-browser user agent that does JavaScript. But you should still be able to "know" what would be the result of clicking the button in terms of setting the form field values, and set them yourself. Srdjan David McBride wrote: | Thanks for replying. | | The parameters won’t be processed if the submit() function doesn’t run | and the submit() function won’t operate unless the image is clicked. | | So, I’m still stuck with trying to click the image. | | - David | | on 6/1/04 7:01 PM, Srdjan at sr...@ca... wrote: | | That's not button at all - just a clickable image. Considering that | clicking the | image does nothing but submit, you don't need to use ::Click methods | at all - | just a plain POST request with params. | | Srdjan | | David McBride wrote: | | Greetings, | | | | | | | | Im new to WebTest and Ive been playing with it for a couple of days | | with some success. Ive run into a problem, though. I have a login | | form to which I want to submit data (i.e., user_id, password). | The | | form begins as follows: | | | | | | | | <form name="loginForm" id="loginForm" method="POST"> | | | | <input type="hidden" name="form" value="do_log_in"> | | | | | | | | | | | | The form has a button generated as follows: | | | | | | | | <tr> | | | | <td colspan="2" align="right"> | | | | <img src="../images/btn_log_in.gif" | | style="cursor:pointer;cursor:hand" onclick="submit()"); | | | | </td> | | | | </tr> | | | | | | | | Ive been trying to use the ::Click methods to operate the button | | without success. Can someone tell me what I need to do to operate the | | button? Thanks. | | | | | | | | v/r | | | | | | | | - David | | | | | | - ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. |>From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ Http-webtest-general mailing list Htt...@li... https://lists.sourceforge.net/lists/listinfo/http-webtest-general -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFAvXwnZtcHxCitRpgRAkxdAJ9XNIaT7P5qLP4e5+khMXva8jRiVQCfXa61 aqReRstkCgj7ACw9v9yn/oY= =bbrO -----END PGP SIGNATURE----- |
From: Raghavendra H. <rag...@te...> - 2004-06-02 04:42:32
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body> <pre>submit() performs either GET or POST method on the formhandler, You can directly call the webtest with proper method. My webpage also uses the clickable images, but i am able to use as below. $webtest->run_tests( { test_name =>'Logggin in ..', url => $URL."goform/formValidate", method => GET, params => [ username => "$username", password => "$password" ] }, { terse => 'failed_only', ignore_case => 'yes', text_forbid => [ 'Premature end of script headers', 'Error processing directive' ] } ); Thanks Raghavendra </pre> <br> David McBride wrote:<br> <blockquote type="cite" cite="midBCE29097.A7D8%25d...@la..."> <title>Re: [Http-webtest-general] trying to test button</title> <font face="Verdana"><span style="font-size: 12px;">Thanks for replying.<br> <br> The parameters won’t be processed if the submit() function doesn’t run and the submit() function won’t operate unless the image is clicked. <br> <br> So, I’m still stuck with trying to click the image. <br> <br> - David<br> <br> on 6/1/04 7:01 PM, Srdjan at <a class="moz-txt-link-abbreviated" href="mailto:sr...@ca...">sr...@ca...</a> wrote:<br> <br> </span></font> <blockquote><font face="Monaco"><span style="font-size: 14px;"><tt>-----BEGIN PGP SIGNED MESSAGE-----<br> Hash: SHA1<br> <br> That's not button at all - just a clickable image. Considering that clicking the<br> image does nothing but submit, you don't need to use ::Click methods at all -<br> just a plain POST request with params.<br> <br> Srdjan<br> <br> David McBride wrote:<br> | Greetings,<br> |<br> |<br> |<br> | I’m new to WebTest and I’ve been playing with it for a couple of days<br> | with some success. I’ve run into a problem, though. I have a login<br> | form to which I want to submit data (i.e., “user_id”, “password”). The<br> | form begins as follows:<br> |<br> |<br> |<br> | <form name="loginForm" id="loginForm" method="POST"><br> |<br> | <input type="hidden" name="form" value="do_log_in"><br> |<br> |<br> |<br> |<br> |<br> | The form has a button generated as follows:<br> |<br> |<br> |<br> | <tr><br> |<br> | <td colspan="2" align="right"><br> |<br> | <img src="../images/btn_log_in.gif"<br> | style="cursor:pointer;cursor:hand" onclick="submit()");<br> |<br> | </td><br> |<br> | </tr><br> |<br> |<br> |<br> | I’ve been trying to use the ::Click methods to operate the button<br> | without success. Can someone tell me what I need to do to operate the<br> | button? Thanks.<br> |<br> |<br> |<br> | v/r<br> |<br> |<br> |<br> | - David<br> |<br> |<br> |<br> -----BEGIN PGP SIGNATURE-----<br> Version: GnuPG v1.2.4 (GNU/Linux)<br> Comment: Using GnuPG with Thunderbird - <a href="http://enigmail.mozdev.org">http://enigmail.mozdev.org</a><br> <br> iD8DBQFAvTTcZtcHxCitRpgRAhcxAJ4nJDfTGpjE6ADJBvIdRTAb1mnacwCgpLtC<br> HfLkk35G/3wiVKJXNFF0Fi8=<br> =60PM<br> -----END PGP SIGNATURE-----<br> <br> <br> -------------------------------------------------------<br> This SF.Net email is sponsored by the new InstallShield X.<br> >From Windows to Linux, servers to mobile, InstallShield X is the one<br> installation-authoring solution that does it all. Learn more and<br> evaluate today! <a href="http://www.installshield.com/Dev2Dev/0504">http://www.installshield.com/Dev2Dev/0504</a><br> _______________________________________________<br> Http-webtest-general mailing list<br> <a class="moz-txt-link-abbreviated" href="mailto:Htt...@li...">Htt...@li...</a><br> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/http-webtest-general">https://lists.sourceforge.net/lists/listinfo/http-webtest-general</a><br> <br> </tt></span></font></blockquote> <font face="Monaco"><span style="font-size: 14px;"><tt><br> </tt></span></font> </blockquote> <br> <pre class="moz-signature" cols="72">-- Raghavendra Hegde Teneoris Networks, Bangalore </pre> </body> </html> |
From: David M. <dmc...@la...> - 2004-06-02 03:01:29
|
Thanks for replying. The parameters won=B9t be processed if the submit() function doesn=B9t run and the submit() function won=B9t operate unless the image is clicked. So, I=B9m still stuck with trying to click the image. - David on 6/1/04 7:01 PM, Srdjan at sr...@ca... wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > That's not button at all - just a clickable image. Considering that click= ing > the > image does nothing but submit, you don't need to use ::Click methods at a= ll - > just a plain POST request with params. >=20 > Srdjan >=20 > David McBride wrote: > | Greetings, > | > | > | > | I=B9m new to WebTest and I=B9ve been playing with it for a couple of days > | with some success. I=B9ve run into a problem, though. I have a login > | form to which I want to submit data (i.e., =B3user_id=B2, =B3password=B2). The > | form begins as follows: > | > | > | > | <form name=3D"loginForm" id=3D"loginForm" method=3D"POST"> > | > | <input type=3D"hidden" name=3D"form" value=3D"do_log_in"> > | > | > | > | > | > | The form has a button generated as follows: > | > | > | > | <tr> > | > | <td colspan=3D"2" align=3D"right"> > | > | <img src=3D"../images/btn_log_in.gif" > | style=3D"cursor:pointer;cursor:hand" onclick=3D"submit()"); > | > | </td> > | > | </tr> > | > | > | > | I=B9ve been trying to use the ::Click methods to operate the button > | without success. Can someone tell me what I need to do to operate the > | button? Thanks. > | > | > | > | v/r > | > | > | > | - David > | > | > | > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.4 (GNU/Linux) > Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org >=20 > iD8DBQFAvTTcZtcHxCitRpgRAhcxAJ4nJDfTGpjE6ADJBvIdRTAb1mnacwCgpLtC > HfLkk35G/3wiVKJXNFF0Fi8=3D > =3D60PM > -----END PGP SIGNATURE----- >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by the new InstallShield X. > From Windows to Linux, servers to mobile, InstallShield X is the one > installation-authoring solution that does it all. Learn more and > evaluate today! http://www.installshield.com/Dev2Dev/0504 > _______________________________________________ > Http-webtest-general mailing list > Htt...@li... > https://lists.sourceforge.net/lists/listinfo/http-webtest-general >=20 |
From: Srdjan <sr...@ca...> - 2004-06-02 02:01:11
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 That's not button at all - just a clickable image. Considering that clicking the image does nothing but submit, you don't need to use ::Click methods at all - just a plain POST request with params. Srdjan David McBride wrote: | Greetings, | | | | I’m new to WebTest and I’ve been playing with it for a couple of days | with some success. I’ve run into a problem, though. I have a login | form to which I want to submit data (i.e., “user_id”, “password”). The | form begins as follows: | | | | <form name="loginForm" id="loginForm" method="POST"> | | <input type="hidden" name="form" value="do_log_in"> | | | | | | The form has a button generated as follows: | | | | <tr> | | <td colspan="2" align="right"> | | <img src="../images/btn_log_in.gif" | style="cursor:pointer;cursor:hand" onclick="submit()"); | | </td> | | </tr> | | | | I’ve been trying to use the ::Click methods to operate the button | without success. Can someone tell me what I need to do to operate the | button? Thanks. | | | | v/r | | | | - David | | | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFAvTTcZtcHxCitRpgRAhcxAJ4nJDfTGpjE6ADJBvIdRTAb1mnacwCgpLtC HfLkk35G/3wiVKJXNFF0Fi8= =60PM -----END PGP SIGNATURE----- |
From: David M. <dmc...@la...> - 2004-06-02 00:58:50
|
Greetings, I'm new to WebTest and I've been playing with it for a couple of days with some success. I've run into a problem, though. I have a login form to which I want to submit data (i.e., "user_id", "password"). The form begins as follows: <form name="loginForm" id="loginForm" method="POST"> <input type="hidden" name="form" value="do_log_in"> The form has a button generated as follows: <tr> <td colspan="2" align="right"> <img src="../images/btn_log_in.gif" style="cursor:pointer;cursor:hand" onclick="submit()"); </td> </tr> I've been trying to use the ::Click methods to operate the button without success. Can someone tell me what I need to do to operate the button? Thanks. v/r - David |
From: William M. <wi...@kn...> - 2004-05-24 15:48:37
|
On Mon, May 24, 2004 at 10:24:55AM +0530, Raghavendra Hegde wrote: > HTTP 1.1 supports Special authorization which does not require the client to se > nd username/password in clear text > at login pages. > There are 2 kinds of authorization 1) Basic 2) Digest Yes, I am familiar with Basic and Digest authorization. I do not use either in my pages so cannot provide further assistance for testing your pages. I advise reading the docs and looking into libwww which is what HTTP::WebTest uses to communicate with the server (specifically look into LWP::UserAgent). Good luck, William -- Knowmad Services Inc. http://www.knowmad.com |
From: Raghavendra H. <rag...@te...> - 2004-05-24 04:55:18
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body> <pre>Thanks for your reply. HTTP 1.1 supports Special authorization which does not require the client to send username/password in clear text at login pages. There are 2 kinds of authorization 1) Basic 2) Digest My SUT was upgraded to support Digest HTTP authorization method where Server challeges the client with a challenge text and Client has to create md5 digest based on few parameters such nonce, username, password, uri, etc.. and send this to server. (RFC 2617 explains this) My problem was how to create such digest, given the challenge text(nonce) and other parameters.. And now, i have found a way to successfully login to DUT - but still facing some problems as all the further requests to server has also have to send such a uniq "digest" (which has to be recalculated as uri we are requesting is different) and a uniq "counter" which allows the server to avoid replay attacks.. Please let me know, if any api is available in WebTest through which all these parameters are automatically calculated/incremented and sent to server. (Just like cookie support) Thanks Raghavendra </pre> <br> William McKee wrote:<br> <blockquote type="cite" cite="mid...@kn..."> <pre wrap="">On Fri, May 21, 2004 at 11:18:04AM +0530, Raghavendra Hegde wrote: </pre> <blockquote type="cite"> <pre wrap="">I need to use the WebTest with Authorization support.. Does the WebTest support this kind of authorization? Is there any readily available method? </pre> </blockquote> <pre wrap=""><!----> I think it depends on what kind of Authorization support you need. Have you looked at the examples provided in the cookbook that is distributed with the module? Have you tried anything yet? I have no trouble logging into my websites which require username/password. HTH, William </pre> </blockquote> </body> </html> |
From: William M. <wi...@kn...> - 2004-05-21 17:29:04
|
On Fri, May 21, 2004 at 11:18:04AM +0530, Raghavendra Hegde wrote: > I need to use the WebTest with Authorization support.. > Does the WebTest support this kind of authorization? > Is there any readily available method? I think it depends on what kind of Authorization support you need. Have you looked at the examples provided in the cookbook that is distributed with the module? Have you tried anything yet? I have no trouble logging into my websites which require username/password. HTH, William -- Knowmad Services Inc. http://www.knowmad.com |
From: Raghavendra H. <rag...@te...> - 2004-05-21 05:48:11
|
Hi, I need to use the WebTest with Authorization support.. Does the WebTest support this kind of authorization? Is there any readily available method? Thanks Raghavendra |
From: Ilya M. <il...@ip...> - 2004-05-05 13:21:58
|
>>>>> "SW" == Schwarz, Wolfgang <sc...@am...> writes: SW> sorry for bothering again, hopefully the last time. SW> I found out that SW> $wt->current_request->content SW> doesn't return any data, thats the reason I get no match. SW> do I need to add some module to have that work ? Sorry, it should be $wt->current_response->content instead of $wt->current_request->content. -- 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: Schwarz, W. <sc...@am...> - 2004-05-05 13:18:44
|
sorry for bothering again, hopefully the last time.=20 I found out that=20 $wt->current_request->content=20 doesn't return any data, thats the reason I get no match. do I need to add some module to have that work ? I currently use : use strict; use lib '/usr/lib/perl5/site_perl/5.6.0'; use HTTP::WebTest; I am calling webtest from a perl-script with: my $wt =3D new HTTP::WebTest; $wt->run_tests( $test1, $params); and this is the part of my testsuite that breaks. # test 6=20 { 'test_name' =3D> 'step6', 'url' =3D> '........', 'method' =3D> 'post', 'form_name' =3D> '<form name=3D"">', 'params' =3D> { 'submit.x' =3D> '0', 'submit.y' =3D> '0' }, 'regex_require' =3D> [ 'order\.\d+:\d+', sub { my $wt =3D shift; $wt->current_request->content =3D~ = /(order\.\d+)/) 'order\.'.$1; }, ], 'regex_forbid' =3D> [ 'failed', ] }, thanks for your help Wolle -----Urspr=FCngliche Nachricht----- Von: Ilya Martynov [mailto:il...@ip...]=20 Gesendet: Mittwoch, 5. Mai 2004 11:45 An: Schwarz, Wolfgang Cc: htt...@li... Betreff: Re: [Http-webtest-general] using regex matches in later regexes >>>>> "SW" =3D=3D Schwarz, Wolfgang <sc...@am...> writes: SW> Hi,=20 SW> I am new to Webtest and I couldn't find an answer to my=20 question in the archives, yet. SW> I need to take a regex match from one test and make it part=20 of the next regex required on the same page=20 SW> and use it in a post on the following page.=20 SW> Its an easy task in perl storeing the match in the $1=20 variable, done in various scripts, but webtest doesn't seem to=20 like me doing it. SW> I tried it like this: SW> 'regex_require' =3D> [ SW> 'order\.(\d+:\d+)',=09 SW> 'order\.'.$1 SW> ] SW> although the first regex is successful the match is not=20 stored and the variable is empty. Line "'order\.'.$1" is being evaluated by Perl at the time you define a data structure which defines a test. It is not being evaluated by Perl at the time when test is being run. In other words Line "'order\.'.$1" is being evaluated too early - before any match is being made. To make sure that code is being evaluted at the time when tests are being run you should replace a string which describes regular expression with a anonymous subroutine which returns a regexp. I.e. 'regex_require' =3D> [ 'order\.(\d+:\d+)',=09 sub { 'order\.'.$1 } ] This will cause content of the anonymous sub to be evaluted during test run. Unfortunately it still doesn't seem to work and I cannot quickly say why. Instead you can try following workaround: 'regex_require' =3D> [ 'order\.(\d+:\d+)',=09 sub { my $wt =3D shift; $wt->current_request->content =3D~=20 /order\.(\d+:\d+)/; 'order\.'.$1; } ] This workaround runs you regexp twice and uses result of second match to build a regexp to be used in the test. SW> REQUIRED REGEX SW> order\.(\d+:\d+) SUCCEED SW> order\. SUCCEED (BAD b/c I=20 am expecting the regex to look like "order\.123:123456789" ) SW> what am I doing wrong here ? --=20 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...@ip...> - 2004-05-05 09:44:52
|
>>>>> "SW" == Schwarz, Wolfgang <sc...@am...> writes: SW> Hi, SW> I am new to Webtest and I couldn't find an answer to my question in the archives, yet. SW> I need to take a regex match from one test and make it part of the next regex required on the same page SW> and use it in a post on the following page. SW> Its an easy task in perl storeing the match in the $1 variable, done in various scripts, but webtest doesn't seem to like me doing it. SW> I tried it like this: SW> 'regex_require' => [ SW> 'order\.(\d+:\d+)', SW> 'order\.'.$1 SW> ] SW> although the first regex is successful the match is not stored and the variable is empty. Line "'order\.'.$1" is being evaluated by Perl at the time you define a data structure which defines a test. It is not being evaluated by Perl at the time when test is being run. In other words Line "'order\.'.$1" is being evaluated too early - before any match is being made. To make sure that code is being evaluted at the time when tests are being run you should replace a string which describes regular expression with a anonymous subroutine which returns a regexp. I.e. 'regex_require' => [ 'order\.(\d+:\d+)', sub { 'order\.'.$1 } ] This will cause content of the anonymous sub to be evaluted during test run. Unfortunately it still doesn't seem to work and I cannot quickly say why. Instead you can try following workaround: 'regex_require' => [ 'order\.(\d+:\d+)', sub { my $wt = shift; $wt->current_request->content =~ /order\.(\d+:\d+)/; 'order\.'.$1; } ] This workaround runs you regexp twice and uses result of second match to build a regexp to be used in the test. SW> REQUIRED REGEX SW> order\.(\d+:\d+) SUCCEED SW> order\. SUCCEED (BAD b/c I am expecting the regex to look like "order\.123:123456789" ) SW> what am I doing wrong here ? -- 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: Schwarz, W. <sc...@am...> - 2004-05-05 09:21:49
|
Hi,=20 I am new to Webtest and I couldn't find an answer to my question in the = archives, yet. I need to take a regex match from one test and make it part of the next = regex required on the same page=20 and use it in a post on the following page.=20 Its an easy task in perl storeing the match in the $1 variable, done in = various scripts, but webtest doesn't seem to like me doing it. I tried it like this: 'regex_require' =3D> [ 'order\.(\d+:\d+)',=09 'order\.'.$1 ] although the first regex is successful the match is not stored and the = variable is empty. REQUIRED REGEX order\.(\d+:\d+) SUCCEED order\. SUCCEED (BAD b/c I am expecting the = regex to look like "order\.123:123456789" ) what am I doing wrong here ? -wolle ---------- Modern elevators are strange and complex entities. The ancient electric winch and "maximum-capacity-eight-persons" jobs bear as much relation to a Sirius Cybernetics Corporation Happy Vertical People Transporter as a packet of mixed nuts does to the entire west wing of the Sirian State Mental Hospital. =20 |
From: Srdjan <sr...@ca...> - 2004-04-27 07:04:13
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This is how: I changed existing if(defined $click_link) {} elsif(defined $click_button) {} elsif(defined $form_name) {} switch, but you may not need all the changes, just the marked one lib/HTTP/WebTest/Plugin/Click.pm, around line 102: - ----- cut here --------- ~ if(defined $click_link) { # find matching link my $link = $self->find_link(response => $response, pattern => $click_link); if (defined $link) { $request->uri($link) ~ $request->referer($response->base); # <--- this is what you need ~ } ~ } elsif($click_button || $form_name) { # find action which corresponds to requested submit button and/or form name # we combine it because we may have a situation with multiple forms on the page my $action = $self->find_form(response => $response, form_name => $form_name, pattern => $click_button); $request->uri($action) if defined $action; ~ } - ----- cut here --------- I was supposed to check this in ages ago, but I got tied up and couldn't get around testing all changes properly. And the way things are going, I'll be dead for another two months, so you'll have to hack it for the time being. Cheers, Srdjan Raghavendra Hegde wrote: | Hi, | | My web-server expects the "Referer" HTTP header field to be set with | some values. | Can anybody let me know, how to set this field using HTTP::WebTest. | | I am trying to upload a file, but the webserver takes the PATH to store | the uploaded file, | from the Referer field (such as listedpath=/home/raghavendra/Docs) ;; | I dont know how to set this field from Webtest. | | Thanks, | Raghavendra | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Debian - http://enigmail.mozdev.org iD4DBQFAjgWkX4ZD19jq88YRAmvRAJiZs+5PodiUnqpTgo+4mw1qfEEnAJoDdmu+ PtXpa53MJPC6Ym9FTkGAvA== =wWQQ -----END PGP SIGNATURE----- |
From: Raghavendra H. <rag...@te...> - 2004-04-27 05:29:38
|
Hi, My web-server expects the "Referer" HTTP header field to be set with some values. Can anybody let me know, how to set this field using HTTP::WebTest. I am trying to upload a file, but the webserver takes the PATH to store the uploaded file, from the Referer field (such as listedpath=/home/raghavendra/Docs) ;; I dont know how to set this field from Webtest. Thanks, Raghavendra -- Raghavendra G Hegde, Teneoris Networks India Pvt Ltd. #8, 2nd Floor, Bannerghatta Rd, 3rd Phase, J.P.Nagar, Bangalore-560076 Ph: 26493500, Ext: 247 |
From: Ilya M. <il...@ip...> - 2004-04-22 12:14:16
|
>>>>> "RH" == Raghavendra Hegde <rag...@te...> writes: RH> Hi, RH> I am facing some problems while uploading a file. RH> 1) RH> Problem is that, when I upload a file, the uploaded file will always have 15 character extra. From I see in your logs the problem is not that HTTP::WebTest adds additional chars (they are ok) but that HTTP::WebTest generates incorrect Content-Type header. I'll investigate what's wrong with it. RH> 2) ALSO, Is there way to download file from web using HTTP::WEBTEST? Well, technically it is possible. You can add on_response hook with some Perl code to store HTTP response on disk. On the other hand I think you just using wrong tool and you'd better just use LWP::UserAgent. *Untested example* plugins = ( ::Hooks ) test_name = download file url = ... on_response = { my $webtest = shift; open FILE, '> /path/to/file'; print FILE $webtest->current_response->content; close FILE; [] } end_test -- 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: Raghavendra H. <rag...@te...> - 2004-04-21 14:03:05
|
Hi, I am facing some problems while uploading a file. 1) Problem is that, when I upload a file, the uploaded file will always have 15 character extra. Can someone in list go through the attached files and help me in debugging, why this is happening? And always the extracharacters added were "--xYzZY--" (without quotes). Attached tar file contains 3 ethereal dumps (using webtest, ie, mozilla) 1 text file (17 bytes, that I was trying to upload) 1 .pl file (this is the script i am using to upload file) What I could find out using ethereal dumps is: In content-type ; "boundary-value" field is missing only in the dump that was taken while webtest is running. 2) ALSO, Is there way to download file from web using HTTP::WEBTEST? Thanking in advance, Raghavendra -- Raghavendra G Hegde, Teneoris Networks India Pvt Ltd. #8, 2nd Floor, Bannerghatta Rd, 3rd Phase, J.P.Nagar, Bangalore-560076 Ph: 26493500, Ext: 247 |
From: William M. <wi...@kn...> - 2004-03-26 03:58:13
|
On Wed, Mar 24, 2004 at 09:25:08PM -0800, Carlos Ramirez wrote: > * Updated result status line. Now prints out: N links found. M unique > links tested. Failed: X Thanks. > If your authentication relies on cookie-based sessions, > then I'll incorporate LWP's cookie_jar method into the mix. It does use cookies. However, the problem is showing up *before* I login. The Apache::AuthCookie does a redirect[1] which is not getting picked up correctly by WebTest; using GET function works. It's no big deal since you fixed the problem I was having with ignore_links. Regards, William [1] http://search.cpan.org/~mschout/Apache-AuthCookie-3.05/AuthCookie.pm.mp1#DESCRIPTION -- Knowmad Services Inc. http://www.knowmad.com |
From: Carlos R. <cra...@gt...> - 2004-03-25 05:08:23
|
Lastest update includes: * Updated result status line. Now prints out: N links found. M unique links tested. Failed: X * Added $req->authorization_basic() to each HTTP:Request object before links are checked. The credentials passed only if the auth test parameter are defined. The second bulleted should fix your problem. This version sends the username/password to password protected pages using Basic authentication. If your authentication relies on cookie-based sessions, then I'll incorporate LWP's cookie_jar method into the mix. Unfortunately, I won't be able to work on the code until tommorrow evening.. In the meantime, please test this version to see it it fixes things for you. It resolved the issues I was experiencing. Source: http://www.quantumfx.com/software/modules/HTTP-WebTest-Plugin-LinksTest.pm Thanks for you suggestions and comments. -Carlos William McKee wrote: >On Wed, Mar 24, 2004 at 08:50:00AM -0800, Carlos Ramirez wrote: > > >>Are you using check_links = yes with this? Both check_links = yes and >>ignore_links = (LOGIN) have to be defined. I'll look into the redirect >>page and updating the results output. >> >> > >Yes, I have check_links set to yes as well as the debug_links. That's >how I'm seeing that the LOGIN page is still being checked. > > >Thanks, >William > > > |
From: William M. <wi...@kn...> - 2004-03-24 17:42:33
|
On Wed, Mar 24, 2004 at 08:50:00AM -0800, Carlos Ramirez wrote: > Are you using check_links = yes with this? Both check_links = yes and > ignore_links = (LOGIN) have to be defined. I'll look into the redirect > page and updating the results output. Yes, I have check_links set to yes as well as the debug_links. That's how I'm seeing that the LOGIN page is still being checked. Thanks, William -- Knowmad Services Inc. http://www.knowmad.com |
From: Sandro W. <sa...@wa...> - 2004-03-24 17:24:43
|
Hi all, sorry for the stupid question, are the DBI functions within "on_response" limited any how??? I'm trying to do inserts on response but I'm not able to write into the database. The DBI-Elements work if i run them isolated. ############################################################## on_start = { require DBI; $dbh = DBI->connect('DBI:dbd:db;host:3306', "user", "pass"); } on_finish = { $dbh->disconnect; } test_name = Start Seite show_cookies = yes max_rtime = 1.00 url = http://host/ text_require = ( "blah" ) on_response = { $sth = $dbh->do("INSERT INTO testdb(blah, blah....)); # $sth = $dbh->prepare("INSERT INTO testdb(blah, blah....)); # $sth->execute(); } end_test ############################################################## Cheers, Sandro |
From: Carlos R. <cra...@gt...> - 2004-03-24 16:33:11
|
Are you using check_links = yes with this? Both check_links = yes and ignore_links = (LOGIN) have to be defined. I'll look into the redirect page and updating the results output. -Carlo William McKee wrote: >On Tue, Mar 23, 2004 at 11:05:12PM -0800, Carlos Ramirez wrote: > > >>::LinksTest module update: >>* Added match_links = (regex1 regex2) >>* Added ignore_links = (regex1 regex2) >> >> > >Thanks! Unfortunately, I'm not having any luck with it. Here are the >formats I've tried: > > ignore_links = (qr/LOGIN/) > ignore_links = ('LOGIN') > ignore_links = (LOGIN) > >The url being tested is 'form: https://quicktel:8443/LOGIN'. What am I >doing wrong? > > > > >>* Changed LWP requests to GET instead of HEAD requests. >> >> > >My redirect page still fails with a 403. It's easy enough to use >ignore_links to skip this error. > > > > >>* Only checks unique links now. I noticed that it was checking >>duplicate links if they existed in the document. >> >> > >Cool. > > > > >>The results now reports the total count of UNIQUE links in the document, >>count of tested links, and the failure count. Sample output: >> >>8 links found, 3 tested. Failed: 0. >> >> > >My only comment about this format is that it doesn't clearly indicate >that only 3 were tested because the others were dupes. How about >something like the following: > > 8 links found, 3 unique links tested. Failed: 0. > > > > >>Ilya already added this module to CVS, so it will be included in the >>next release. If you want to test it, here is the source: >> >> > >Great. > > >Thanks, >William > > > |
From: William M. <wi...@kn...> - 2004-03-24 16:06:08
|
On Tue, Mar 23, 2004 at 11:05:12PM -0800, Carlos Ramirez wrote: > ::LinksTest module update: > * Added match_links = (regex1 regex2) > * Added ignore_links = (regex1 regex2) Thanks! Unfortunately, I'm not having any luck with it. Here are the formats I've tried: ignore_links = (qr/LOGIN/) ignore_links = ('LOGIN') ignore_links = (LOGIN) The url being tested is 'form: https://quicktel:8443/LOGIN'. What am I doing wrong? > * Changed LWP requests to GET instead of HEAD requests. My redirect page still fails with a 403. It's easy enough to use ignore_links to skip this error. > * Only checks unique links now. I noticed that it was checking > duplicate links if they existed in the document. Cool. > The results now reports the total count of UNIQUE links in the document, > count of tested links, and the failure count. Sample output: > > 8 links found, 3 tested. Failed: 0. My only comment about this format is that it doesn't clearly indicate that only 3 were tested because the others were dupes. How about something like the following: 8 links found, 3 unique links tested. Failed: 0. > Ilya already added this module to CVS, so it will be included in the > next release. If you want to test it, here is the source: Great. Thanks, William -- Knowmad Services Inc. http://www.knowmad.com |
From: Carlos R. <cra...@gt...> - 2004-03-24 06:48:18
|
::LinksTest module update: * Added match_links = (regex1 regex2) * Added ignore_links = (regex1 regex2) * Changed LWP requests to GET instead of HEAD requests. * Only checks unique links now. I noticed that it was checking duplicate links if they existed in the document. If match_links and ignore_links are used on the same test, match_links are first applied, then ignore_links are applied. The results now reports the total count of UNIQUE links in the document, count of tested links, and the failure count. Sample output: 8 links found, 3 tested. Failed: 0. Ilya already added this module to CVS, so it will be included in the next release. If you want to test it, here is the source: Source: http://www.quantumfx.com/software/modules/HTTP-WebTest-Plugin-LinksTest.pm Docs: http://www.quantumfx.com/software/modules/HTTP-WebTest-Plugin-LinksTest.html -Carlos William McKee wrote: >On Thu, Mar 18, 2004 at 10:22:54PM -0800, Carlos Ramirez wrote: > > >>Let me know if the output is any helpful. Thanks. >> >> > >Carlos, > >Sorry for the belated response. The new function debug_links works >wonderfully. My https links are working fine. The failure was due to the >fact that I ran the test on a project that is in production and it >caught a typo. > >I also get an error on a redirect page. GET works fine but HEAD returns >403 Forbidden. I'm using Apache::AuthCookieDBI to handle my login and >don't fully understand how it works in regards to redirects. I suspect >that it's a problem on my end. It would be nice to pass in a regex of >links to search/ignore. For example, > > match_links = ^https:// > >would only test links on a secure server whereas > > ignore_links = ^https:// > >would ignore all those links. Thanks for your contribution. When are you >going to load it onto CPAN? > > >Regards, >William > > > |
From: William M. <wi...@kn...> - 2004-03-22 18:40:26
|
On Thu, Mar 18, 2004 at 10:22:54PM -0800, Carlos Ramirez wrote: > Let me know if the output is any helpful. Thanks. Carlos, Sorry for the belated response. The new function debug_links works wonderfully. My https links are working fine. The failure was due to the fact that I ran the test on a project that is in production and it caught a typo. I also get an error on a redirect page. GET works fine but HEAD returns 403 Forbidden. I'm using Apache::AuthCookieDBI to handle my login and don't fully understand how it works in regards to redirects. I suspect that it's a problem on my end. It would be nice to pass in a regex of links to search/ignore. For example, match_links = ^https:// would only test links on a secure server whereas ignore_links = ^https:// would ignore all those links. Thanks for your contribution. When are you going to load it onto CPAN? Regards, William -- Knowmad Services Inc. http://www.knowmad.com |