http-webtest-general Mailing List for HTTP-WebTest (Page 12)
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: Ilya M. <il...@ma...> - 2002-11-04 21:44:47
|
>>>>> On Sun, 3 Nov 2002 11:21:10 -0800 (PST), "Dr. Tolga Yalcinkaya" <tya...@ya...> said: TY> Ilya, TY> Thanks for the response, albeit late, it is still TY> better than none :-) TY> The need for handling frames is due to single signon TY> implementations. Typically, one frame TY> provides/maintains single signon session state and TY> another frame provides application content and TY> application session state. In all cases, session TY> states are maintained via hidden variables, cookies, TY> javascripts etc. TY> In my case, it is important that the test script TY> invoke all frames for a given URL, in order to TY> maintain session states in different frames. TY> Although the method that you describe below does TY> provide a simplistic approach to the problem, it does TY> not address the fundamental problem of cookies and TY> session variables in multiple frames for a given URL. TY> Don't you think it is more desirable to have a TY> mechanism in place that deals with frames more TY> elegantly, and perhaps seamlessly? There might be TY> particular reasons why a tester would like to handle TY> frames manually. Hence, it would be very desirable to TY> have a parameter that turns frame support on and off. TY> Any thoughts? Hmm, how seamless do you want it to be? The problem is that HTTP-WebTest is based on idea that one test corresponds to one request/response pair. In short HTTP-WebTest is written on the HTTP protocol level which knows nothing about frames. This is fundamental design decision and it is not that easy to change. It is possible to write HTTP-WebTest plugin that does automatic fetching of all frames for each frameset url in test sequence but HTTP-WebTest architecture will not allow you *easily* perform tests on these automatically fetched frames (because now you have one test corresponding to many request/response pairs). Anyway if you only want session data from frames (i.e. cookies as I understand) than probably it is ok. I'm not sure I have time to write such plugin now but it should not be very hard and if you are interested I can provide you with some directions. P.S. And no, it seems that you cannot just replace LWP::UserAgent with LWP::UserAgent::FramesReady in HTTP::WebTest and expect it work out of box - as I understand they have incompatible APIs. -- 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-11-04 17:53:42
|
>>>>> On Mon, 4 Nov 2002 17:43:15 +0100, Kevin Baker <ke...@ri...> said: KB> Hi KB> sorry for the late reply, been on leave... KB> I'm trying to get access to the value on the cookie returned since I need KB> know the cookie value to set as a param in a subsequent call KB> So I run one web test to get the cookie and then extract it KB> from the last_response and then run some more tests. KB> [..snip..] KB> Unless you can see an easier way to accomplish this. Sure :) Untested code: my $wt = HTTP::WebTest->new; # run tests to get cookie $wt->run_tests([ ... { ... param => { sid => sub { my $wt = shift; my($cookie) = get_cookies($wt->last_response); return $cookie->[2]; } }, ... } ... ]); sub get_cookies { my $response = shift; # parse cookies in response use HTTP::Cookies; my $cookie_jar = HTTP::Cookies->new; $cookie_jar->extract_cookies($response); # suck cookies out of cookie jar via scan my @cookies; $cookie_jar->scan(sub {push @cookies, [@_]}); @cookies } This code can probably be made even simplier as you can access cookie jar used by HTTP-WebTest and which should contain all collected cookies directly via $webtest->user_agent->cookie_jar. Anyway I've applied your patch and your code is in CVS repository. Thanks you again for the patch. -- 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: Kevin B. <ke...@ri...> - 2002-11-04 16:43:25
|
Hi sorry for the late reply, been on leave... I'm trying to get access to the value on the cookie returned since I need know the cookie value to set as a param in a subsequent call So I run one web test to get the cookie and then extract it from the last_response and then run some more tests. my $wt = HTTP::WebTest->new; # run tests to get cookie $wt->run_tests([{...}]); # get cookie returns an array ref of the cookie my ($cookie) = get_cookie($wt->last_response); # run more tests $wt->run_tests([{ ... param => { sid => $cookie->[2] }, # using cookie value here in call cookies => [ $cookie ] ... } ]); sub get_cookies { my $response = shift; # parse cookies in response use HTTP::Cookies; my $cookie_jar = HTTP::Cookies->new; $cookie_jar->extract_cookies($response); # suck cookies out of cookie jar via scan my @cookies; $cookie_jar->scan(sub {push @cookies, [@_]}); @cookies } Unless you can see an easier way to accomplish this. * Ilya Martynov <il...@ma...> [2002-10-18 19:58:33 +0400]: > >>>>> On Fri, 18 Oct 2002 15:41:28 +0200, Kevin Baker <ke...@ri...> said: > > KB> Hi, > > Hi Kevin, > > KB> I was trying to get the last_response from HTTP::WebTest > KB> but it was always returning undef. > > KB> Looking at run_tests I suspect that there is a bug with the > KB> final setting of last_test. The last call to last_test sets > KB> it to undef. > > It is not a bug, it is a feature :). I didn't though that anybody > would use last_xxx methods after running tests (note that you can > always get to last test results via ${$webtest->tests}[-1]->response). > I supposed that these methods would be used during test runtime (for > example in plugins). > > Well, having said this I should admit that I don't really see why it > should be forbiden to use these methods after running tests and I > can't recall why I explictly forbid it. So I'm going to apply your > patch unless I recall any special reason why it is wrong. > > Thanks for your patch anyway. > > -- > 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 -- Kevin Baker RIPE NCC |
From: Dr. T. Y. <tya...@ya...> - 2002-11-03 19:21:11
|
Ilya, Thanks for the response, albeit late, it is still better than none :-) The need for handling frames is due to single signon implementations. Typically, one frame provides/maintains single signon session state and another frame provides application content and application session state. In all cases, session states are maintained via hidden variables, cookies, javascripts etc. In my case, it is important that the test script invoke all frames for a given URL, in order to maintain session states in different frames. Although the method that you describe below does provide a simplistic approach to the problem, it does not address the fundamental problem of cookies and session variables in multiple frames for a given URL. Don't you think it is more desirable to have a mechanism in place that deals with frames more elegantly, and perhaps seamlessly? There might be particular reasons why a tester would like to handle frames manually. Hence, it would be very desirable to have a parameter that turns frame support on and off. Any thoughts? T. --- Ilya Martynov <il...@ma...> wrote: > >>>>> On Mon, 28 Oct 2002 16:33:35 -0800 (PST), "Dr. > Tolga Yalcinkaya" <tya...@ya...> said: > > TY> How does one deal with html "Frames" in WebTest? > Is it possible > TY> to use LWP::UserAgent::FramesReady? > > Sorry for delay with reply. I've been offline (short > holidays) for a > week. > > WebTest doesn't provide any special support for > frames. You can test > them separately. I.e. > > test_name = Frame 1 > url = http://server/frame1 > ... > end_test > > test_name = Frame 2 > url = http://server/frame2 > ... > end_test > > ... > > test_name = Frame N > url = http://server/frameN > ... > end_test > > I'm wonder what additional support for testing > frames from > HTTP::WebTest do you need? > > P.S. As I'm not sure what the problem I cannot > really answer if using > LWP::UserAgent::FramesReady can solve 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 > __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ |
From: Ilya M. <il...@ma...> - 2002-11-02 21:26:12
|
>>>>> On Mon, 28 Oct 2002 16:33:35 -0800 (PST), "Dr. Tolga Yalcinkaya" <tya...@ya...> said: TY> How does one deal with html "Frames" in WebTest? Is it possible TY> to use LWP::UserAgent::FramesReady? Sorry for delay with reply. I've been offline (short holidays) for a week. WebTest doesn't provide any special support for frames. You can test them separately. I.e. test_name = Frame 1 url = http://server/frame1 ... end_test test_name = Frame 2 url = http://server/frame2 ... end_test ... test_name = Frame N url = http://server/frameN ... end_test I'm wonder what additional support for testing frames from HTTP::WebTest do you need? P.S. As I'm not sure what the problem I cannot really answer if using LWP::UserAgent::FramesReady can solve 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: Johannes la P. <joe...@us...> - 2002-10-30 21:40:34
|
Hi, A new plugin for HTTP::WebTest has been imported to CVS as a separate module, HTTP-WebTest-Plugin-XMLReport. It's purpose is to output the WebTest results in XML format. This opens up a whole range of post processing options, from rendering to a nice html page to generating other test reports. The DTD is pretty stable for now (it is in use in a production environment), but I still might want to change something before the 1.0 version! Notably, I'm working on a test definition format (also in XML) and it would be nice to be able to feed the report output back into this input module, e.g. to be able to run failed tests again... 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-XMLReport 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 generates report output in XML format. More detail is available from the module's documentation: perldoc HTTP::WebTest::Plugin::XMLReport INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES This module requires these other modules and libraries: XML::Writer (version 0.4 or newer reccommended) IO::Scalar (version 2.0 or later) HTTP::WebTest (duh!) BUGS Many potentially. Note that IO::Scalar is only require'd at runtime if you request the report output as a string (instead of a file handle like e.g. STDOUT). ... Enjoy! Joe. P.S. feedback to this list please! |
From: Johannes la P. <joe...@us...> - 2002-10-30 16:53:55
|
Jagannadh, > I figure in my previous postings that I should have been more clear with my > question.The web page I want to test includes JavaScript for some fields. If those > particular fields do not have a value in them, an alert box comes up, after pressing a > Submit button. I want to be able to generate those alert boxes. Is there anyway to do > that? If I understand you correctly, you want to use HTTP::WebTest to mimic a graphical user agent (that is, a web browser) with all of its behaviour. That means that you acttually have to parse the results as a browser would do, including JavaScript. This is not what WebTest does. The webtest modules can only act on a retrieved document from the web (which can be anything) and perform lots of sanity tests on that content. This means that you can perfectly monitor expected behaviour of a known website. Example: WebTest requests a URL, like http://my.site/start.html WebTest inspects the result (e.g. looks for a terminating </html> tag) WebTest generates a report (there are a lot of more elaborate examples in the documentation - recommended!). However, this has nothing to do with the fact whether this content renders properly on a standard web browser. In other words, WebTest is not a QA tool for acceptance tests , just a generic and versatile monitoring tool to see if an existing situation doesn't change in an unexpected way. If you want to test your (cgi-) form application for certain responses, nearly everything is possible with WebTest (just send a malformed request and check for the expected error message). If that means that this response contains specific JavaScript code (like a custom error message) you can just check for this. On the other hand, if you want to display popups, generated from a web browser by means of JavaScript, you should use your web browser. At least, that's what I think... Cheers, Joe. |
From: Jagannadh P. <jag...@ya...> - 2002-10-30 16:05:44
|
I figure in my previous postings that I should have been more clear with my question.The web page I want to test includes JavaScript for some fields. If those particular fields do not have a value in them, an alert box comes up, after pressing a Submit button. I want to be able to generate those alert boxes. Is there anyway to do that? --------------------------------- Post your free ad now! Yahoo! Canada Personals |
From: Johannes la P. <joe...@us...> - 2002-10-29 08:45:54
|
On Mon, 28 Oct 2002, Jagannadh Pariti wrote: > > In regards to my previous email, if WebTest can test web pages with JavaScript, what is a code example of testing JavaScript? > Jag, Depending on what you want to test in your Javascript, you can always approach it just as text and look for occurences of strings or regexen (with the 'text_require', 'regex_require' etc. tests). The same is true for a pure javascript file - even, for that matter, I test on the string 'GIF98a' in a single pixel GIF image to be sure that the image is returned, not some server error: text_require = "GIF89a" text_forbid = "<html>" HTH! Cheers, Joe. |
From: Dr. T. Y. <tya...@ya...> - 2002-10-29 00:33:36
|
How does one deal with html "Frames" in WebTest? Is it possible to use LWP::UserAgent::FramesReady? Thanks, Tolga __________________________________________________ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ |
From: Jagannadh P. <jag...@ya...> - 2002-10-28 23:09:48
|
In regards to my previous email, if WebTest can test web pages with JavaScript, what is a code example of testing JavaScript? Jag --------------------------------- Post your free ad now! Yahoo! Canada Personals |
From: Jagannadh P. <jag...@ya...> - 2002-10-28 23:06:43
|
Hi. I was wondering if WebTest will recognize a web site that utilizes JavaScript, or does WebTest ignore the JavaScript? Jag --------------------------------- Post your free ad now! Yahoo! Canada Personals |
From: Dr. T. Y. <tya...@ya...> - 2002-10-23 22:27:41
|
How does one deal with "Frames" in WebTest? Is it possible to use LWP::UserAgent::FramesReady? Thanks, Tolga __________________________________________________ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ |
From: Dr. T. Y. <tya...@ya...> - 2002-10-23 22:24:00
|
Ilya, Thanks for responding. I did follow your advice and hacked the DefaultReport to printout the information I need. Thanks again. Tolga. --- Ilya Martynov <il...@ma...> wrote: > >>>>> On Sat, 12 Oct 2002 13:14:13 -0700 (PDT), "Dr. > Tolga Yalcinkaya" <tya...@ya...> said: > > TY> First of all great work! Many thanks for to > Ilya and > TY> Richard (and other who have contributed) for > putting > TY> together a geat peice testing code. > > Thanks for you kind words. > > TY> I have a very simple question/request: > > TY> If there an easy way to generate a report that > has > TY> following information: > > TY> 1. The time it took to perform each test case. > TY> 2. Total time it took to perform the whole test > suite. > TY> 3. Final count on successful/failed test cases > > TY> Now this particularly important for monitoring a > TY> production web site and determining problem > areas. > > TY> Thanks in advance for your response. > > HTTP::WebTest does collect this kind of statistics > (in 1.99xx beta > versions). Though it is not published in default > report. You can read > it via HTTP::WebTest API: > > use HTTP::WebTest; > > my $wt = new HTTP::WebTest; > > $wt->run_wtscript('test.wt'); > > my $i = 1; > my $total = 0; > for my $test (@{$self->webtest->tests}) { > my $response_time = $test->response_time; > $total += $response_time; > > print "Test #$i: response time = > $response_time\n"; > > $i ++; > } > > print "Total: response time = $total\n"; > > You can take default report plugin and hack it to > output this > information too. > > -- > 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 > > > > ------------------------------------------------------- > This sf.net email is sponsored by: viaVerio will pay > you up to > $1,000 for every account that you consolidate with > us. > http://ad.doubleclick.net/clk;4749864;7604308;v? > http://www.viaverio.com/consolidator/osdn.cfm > _______________________________________________ > Http-webtest-general mailing list > Htt...@li... > https://lists.sourceforge.net/lists/listinfo/http-webtest-general __________________________________________________ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ |
From: Ilya M. <il...@ma...> - 2002-10-22 06:31:29
|
>>>>> On Mon, 21 Oct 2002 18:14:36 -0400 (EDT), Jagannadh Pariti <jagpariti= @yahoo.ca> said: JP> Hi. I downloaded version 2.0 to a local directory, and I have JP> superuser/root access. When=A0I invoke "perl Makefile.PL" from my JP> local directory,=A0I get the following error: JP> Warning: prerequisite Pod::Man 1.14 not found at JP> /usr/lib/perl5/5.6.0/ExtUtils/MakeMaker.pm line 349. JP> Because of this error, the "make" part will fail. JP> After exploring my system, I have Pod::Man 1.18 installed, and I know t= he JP> prerequisites in the "INSTALL" file say=A0that 1.14 is required.=A0Is t= here any JP> way to fix this problem? Any advice would be helpful. Thanks. Hmm, how did you find that you have Pod::Man 1.18 installed? When I want to check version number of Perl module I do perl -MPod::Man -e 'print Pod::Man->VERSION, "\n"' What does it show on your system? --=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: Jagannadh P. <jag...@ya...> - 2002-10-21 22:14:42
|
Hi. I downloaded version 2.0 to a local directory, and I have superuser/root access. When I invoke "perl Makefile.PL" from my local directory, I get the following error: Warning: prerequisite Pod::Man 1.14 not found at /usr/lib/perl5/5.6.0/ExtUtils/MakeMaker.pm line 349. Because of this error, the "make" part will fail. After exploring my system, I have Pod::Man 1.18 installed, and I know the prerequisites in the "INSTALL" file say that 1.14 is required. Is there any way to fix this problem? Any advice would be helpful. Thanks. Jag --------------------------------- Post your free ad now! Yahoo! Canada Personals |
From: Ilya M. <il...@ma...> - 2002-10-20 16:10:35
|
>>>>> On Sun, 20 Oct 2002 09:00:33 -0700, "Richard Anderson" <Ric...@ra...> said: RA> Hi Ilya. Good idea. I was in a situation earlier this year where RA> the client did not allow the use of CPAN modules, so instead of RA> File::Temp I used a hack similar to the one that you removed from RA> version 1.04. What did you use to replace File::Temp? Well, none :) It is required only for Apache plugin which I'm removing from the HTTP-WebTest (it will be released as a separate module on the CPAN). BTW File::Temp is pretty standart module and it is included in Perl distro since 5.6.1. But if you are looking for replacement anyway than probably you can find some subs in POSIX module. RA> Richard Anderson RA> ----- Original Message ----- RA> From: "Ilya Martynov" <m_...@us...> RA> To: <htt...@li...> RA> Sent: Saturday, October 19, 2002 5:00 PM RA> Subject: [Http-webtest-commits] HTTP-WebTest Makefile.PL,1.11,1.12 >> Update of /cvsroot/http-webtest/HTTP-WebTest >> In directory usw-pr-cvs1:/tmp/cvs-serv16046 >> >> Modified Files: >> Makefile.PL >> Log Message: >> Remove File::Temp dependancy >> [..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: Richard A. <Ric...@ra...> - 2002-10-20 16:00:44
|
Hi Ilya. Good idea. I was in a situation earlier this year where the client did not allow the use of CPAN modules, so instead of File::Temp I used a hack similar to the one that you removed from version 1.04. What did you use to replace File::Temp? Richard Anderson ----- Original Message ----- From: "Ilya Martynov" <m_...@us...> To: <htt...@li...> Sent: Saturday, October 19, 2002 5:00 PM Subject: [Http-webtest-commits] HTTP-WebTest Makefile.PL,1.11,1.12 > Update of /cvsroot/http-webtest/HTTP-WebTest > In directory usw-pr-cvs1:/tmp/cvs-serv16046 > > Modified Files: > Makefile.PL > Log Message: > Remove File::Temp dependancy > > > Index: Makefile.PL > =================================================================== > RCS file: /cvsroot/http-webtest/HTTP-WebTest/Makefile.PL,v > retrieving revision 1.11 > retrieving revision 1.12 > diff -C2 -d -r1.11 -r1.12 > *** Makefile.PL 19 Oct 2002 22:37:55 -0000 1.11 > --- Makefile.PL 20 Oct 2002 00:00:38 -0000 1.12 > *************** > *** 16,20 **** > PREREQ_PM => { 'Algorithm::Diff' => 0, > 'CGI::Cookie' => 0, > - 'File::Temp' => 0, > 'LWP' => 5.60, > 'MIME::Base64' => 0, > --- 16,19 ---- > *************** > *** 28,32 **** > EXE_FILES => [ File::Spec->catfile(qw(bin wt)) ], > AUTHOR => $AUTHOR, > ! ABSTRACT => 'Run tests on remote URLs or local web files'); > > package MY; > --- 27,31 ---- > EXE_FILES => [ File::Spec->catfile(qw(bin wt)) ], > AUTHOR => $AUTHOR, > ! ABSTRACT => 'Testing static and dynamic web content'); > > package MY; > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: > Access Your PC Securely with GoToMyPC. Try Free Now > https://www.gotomypc.com/s/OSND/DD > _______________________________________________ > Http-webtest-commits mailing list > Htt...@li... > https://lists.sourceforge.net/lists/listinfo/http-webtest-commits > |
From: Ilya M. <il...@ma...> - 2002-10-18 20:47:18
|
>>>>> On Fri, 18 Oct 2002 12:10:33 -0600, Jag Pariti <jag...@io...> said: JP> Hi. This seems like a silly topic, but I was wondering what syntax JP> is necessary to define new functions within existing WebTest JP> modules and how to call them properly from within tags such as JP> "on_response" or "on_request". Any advice would be JP> helpful. Thanks. You can define them for example in on_start hook: on_start = { sub mysub { # do something } } test_name = Some Test .... on_request { # call previously defined sub mysub(); } end_test I *think* it should work. On the other hand it is very luckely that you *should not* do it. If you find youself putting to much Perl code in wtscripts than it is time to consider writting your own plugin this encapsulates all this code. You can find some docs on writting plugins in perldoc HTTP::WebTest::Plugins. Though the best example is sources of existing plugins. -- 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: Jag P. <jag...@io...> - 2002-10-18 18:10:39
|
Hi. This seems like a silly topic, but I was wondering what syntax is necessary to define new functions within existing WebTest modules and how to call them properly from within tags such as "on_response" or "on_request". Any advice would be helpful. Thanks. Jag Pariti Software Developer E-mail: jag...@io... Phone: 780-444-3645 Fax: 780-432-5700 IO-TEK INC. Where the World comes to Communicate!! The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, etransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. www.io-tek.com |
From: Ilya M. <il...@ma...> - 2002-10-18 16:00:49
|
>>>>> On Fri, 18 Oct 2002 15:41:28 +0200, Kevin Baker <ke...@ri...> said: KB> Hi, Hi Kevin, KB> I was trying to get the last_response from HTTP::WebTest KB> but it was always returning undef. KB> Looking at run_tests I suspect that there is a bug with the KB> final setting of last_test. The last call to last_test sets KB> it to undef. It is not a bug, it is a feature :). I didn't though that anybody would use last_xxx methods after running tests (note that you can always get to last test results via ${$webtest->tests}[-1]->response). I supposed that these methods would be used during test runtime (for example in plugins). Well, having said this I should admit that I don't really see why it should be forbiden to use these methods after running tests and I can't recall why I explictly forbid it. So I'm going to apply your patch unless I recall any special reason why it is wrong. Thanks for your patch anyway. -- 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: Kevin B. <ke...@ri...> - 2002-10-18 13:41:38
|
Hi, I was trying to get the last_response from HTTP::WebTest but it was always returning undef. Looking at run_tests I suspect that there is a bug with the final setting of last_test. The last call to last_test sets it to undef. Am I missing something? x19:kevin:~ $ diff --unified /spool/kevin/download/HTTP-WebTest-1.99_09/blib/lib/HTTP/WebTest/API.pm /spool/kevin/perl/lib/site_perl/5.6.0/HTTP/WebTest/API.pm --- /spool/kevin/download/HTTP-WebTest-1.99_09/blib/lib/HTTP/WebTest/API.pm Sat Aug 17 12:24:20 2002 +++ /spool/kevin/perl/lib/site_perl/5.6.0/HTTP/WebTest/API.pm Fri Oct 18 15:25:14 2002 @@ -127,10 +127,10 @@ my $test = $self->tests->[$i]; $self->last_test_num($i); $self->run_test($test, $self->_global_test_params); + $self->last_test($test); } # reset last test object - $self->last_test(undef); # end tests hook for my $plugin (@{$self->plugins}) { |
From: Ilya M. <il...@ma...> - 2002-10-16 08:06:45
|
>>>>> On Sat, 12 Oct 2002 13:14:13 -0700 (PDT), "Dr. Tolga Yalcinkaya" <tya...@ya...> said: TY> First of all great work! Many thanks for to Ilya and TY> Richard (and other who have contributed) for putting TY> together a geat peice testing code. Thanks for you kind words. TY> I have a very simple question/request: TY> If there an easy way to generate a report that has TY> following information: TY> 1. The time it took to perform each test case. TY> 2. Total time it took to perform the whole test suite. TY> 3. Final count on successful/failed test cases TY> Now this particularly important for monitoring a TY> production web site and determining problem areas. TY> Thanks in advance for your response. HTTP::WebTest does collect this kind of statistics (in 1.99xx beta versions). Though it is not published in default report. You can read it via HTTP::WebTest API: use HTTP::WebTest; my $wt = new HTTP::WebTest; $wt->run_wtscript('test.wt'); my $i = 1; my $total = 0; for my $test (@{$self->webtest->tests}) { my $response_time = $test->response_time; $total += $response_time; print "Test #$i: response time = $response_time\n"; $i ++; } print "Total: response time = $total\n"; You can take default report plugin and hack it to output this information too. -- 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: Dr. T. Y. <tya...@ya...> - 2002-10-12 20:14:14
|
First of all great work! Many thanks for to Ilya and Richard (and other who have contributed) for putting together a geat peice testing code. I have a very simple question/request: If there an easy way to generate a report that has following information: 1. The time it took to perform each test case. 2. Total time it took to perform the whole test suite. 3. Final count on successful/failed test cases Now this particularly important for monitoring a production web site and determining problem areas. Thanks in advance for your response. Tolga __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com |
From: Ilya M. <il...@ma...> - 2002-10-12 08:15:15
|
>>>>> On Fri, 11 Oct 2002 17:40:33 -0400, "William McKee" <wi...@kn...> said: WM> That would be helpful; I checked both the cookbook and the main pod for WM> references. Is there a separate FAQ document for WebTest? No. There is no FAQ document. So far this is the only question that is really frequently asked. WM> BTW, my search for ssl in the SourceForge archives turned up no responses. WM> Simply installing Crypt::SSLeay, as explained in the README.SSL file you WM> mentioned, did the job! I've added notes about SSL support in INSTALL file and in HTTP::WebTest POD. -- 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 |