http-webtest-general Mailing List for HTTP-WebTest (Page 10)
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...@ip...> - 2003-03-19 17:38:37
|
>>>>> "LE" == Li, Eddie <Edd...@bg...> writes: LE> Thank, Ilya. LE> I guess that I didn't describe my last question clearly. I didn't mean LE> to save the output of a test. What I really want is the content that LE> WebTest gets from the website. I guess it is a pure HTML source code? LE> Since WebTest can check for the required text with 'text_require', I LE> guess it should be able to save the return content. LE> What I like to do is that I get the return content first, parse it, and LE> do more test. For example, I may run a simple test to www.yahoo.com and LE> get the webpage content, and then find all the links to images, and then LE> run a test for each image. All HTTP requests and HTTP responses (including content) are available via Perl API. For example to get content of HTTP response in the test #$num my $content = $webtest->tests->[$num]->response->content. If you want to get content of HTTP reposense for current test case in one of hooks provided by HTTP::WebTest::Plugin::Hooks plugin you can use shortcut. my $content = $webtest->current_response->content (see http://search.cpan.org/author/ILYAM/HTTP-WebTest-2.01/lib/HTTP/WebTest/Cookbook.pod#Dynamic_Tests for example) Same shortcut will work if you'll define your additional tests in your own plugin. -- 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: Li, E. <Edd...@bg...> - 2003-03-19 17:21:47
|
Thank, Ilya. I guess that I didn't describe my last question clearly. I didn't mean to save the output of a test. What I really want is the content that WebTest gets from the website. I guess it is a pure HTML source code? Since WebTest can check for the required text with 'text_require', I guess it should be able to save the return content.=20 What I like to do is that I get the return content first, parse it, and do more test. For example, I may run a simple test to www.yahoo.com and get the webpage content, and then find all the links to images, and then run a test for each image. Eddie -----Original Message----- From: Ilya Martynov [mailto:il...@ip...]=20 Sent: Wednesday, March 19, 2003 11:06 AM To: Li, Eddie Cc: htt...@li... Subject: Re: [Http-webtest-general] Questions from a beginner >>>>> "LE" =3D=3D Li, Eddie <Edd...@bg...> writes: LE> Thanks a lot for your reply, Ilya. LE> I'm just wondering if there is a way to save the return page of a LE> "wt" test, so that I can write a script to parse the saved return LE> page and then run more wt tests accordingly. If you use Perl API instead of just running wtscript with wt program you can use 'output_ref' and/or 'fh_out' parameters: use HTTP::WebTest; my $output =3D ''; my $webtest =3D HTTP::WebTest->new; $webtest->run_wtscript('script.wt', { output_ref =3D> \$output }); In this case all output will be "redirected" into scalar variable $output. On the other hand I would not parse test output. It is easier to use Perl API to find results of tests. $webtest->tests->[$num]->results returns test results for test #$num. See perldoc HTTP::WebTest::API and HTTP::WebTest::Test for details. Another option (if you just want to add more checks for each test) is either using test parameter on_response from HTTP::WebTest::Plugin::Hooks plugin (see examples in HTTP::WebTest::Cookbook) or even writtin a plugin. Writting new plugin is not hard - see perldoc HTTP::WebTest::Plugins and sources of existing plugins. --=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...> - 2003-03-19 16:06:36
|
>>>>> "LE" == Li, Eddie <Edd...@bg...> writes: LE> Thanks a lot for your reply, Ilya. LE> I'm just wondering if there is a way to save the return page of a LE> "wt" test, so that I can write a script to parse the saved return LE> page and then run more wt tests accordingly. If you use Perl API instead of just running wtscript with wt program you can use 'output_ref' and/or 'fh_out' parameters: use HTTP::WebTest; my $output = ''; my $webtest = HTTP::WebTest->new; $webtest->run_wtscript('script.wt', { output_ref => \$output }); In this case all output will be "redirected" into scalar variable $output. On the other hand I would not parse test output. It is easier to use Perl API to find results of tests. $webtest->tests->[$num]->results returns test results for test #$num. See perldoc HTTP::WebTest::API and HTTP::WebTest::Test for details. Another option (if you just want to add more checks for each test) is either using test parameter on_response from HTTP::WebTest::Plugin::Hooks plugin (see examples in HTTP::WebTest::Cookbook) or even writtin a plugin. Writting new plugin is not hard - see perldoc HTTP::WebTest::Plugins and 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: Li, E. <Edd...@bg...> - 2003-03-19 15:48:54
|
Thanks a lot for your reply, Ilya. I'm just wondering if there is a way to save the return page of a "wt" = test, so that I can write a script to parse the saved return page and = then run more wt tests accordingly. Thanks. Eddie -----Original Message----- From: Ilya Martynov [mailto:il...@ip...]=20 Sent: Tuesday, March 18, 2003 1:07 PM To: Li, Eddie Cc: htt...@li... Subject: Re: [Http-webtest-general] Questions from a beginner >>>>> "LE" =3D=3D Li, Eddie <Edd...@bg...> writes: LE> Hello, guys, LE> Just installed HTTP::WebTest on my Solaris workstation, I started LE> my first try to use "wt" with a simple wtscript as: LE> =A0=A0=A0 test_name =3D Test page LE> =A0=A0=A0=A0=A0=A0=A0 url =3D 192.168.6.22/mytest.html LE> =A0=A0=A0=A0=A0=A0=A0 min_bytes =3D 13000 LE> =A0=A0=A0=A0=A0=A0=A0 max_bytes =3D 99000 LE> =A0=A0=A0=A0=A0=A0=A0 min_rtime =3D 0.010 LE> =A0=A0=A0=A0=A0=A0=A0 max_rtime =3D 10.0 LE> =A0=A0=A0 end_test LE> mytest.html is as simple as: LE> <html> LE> <body> LE> test LE> <img src =3D "/images/test.gif" width =3D "200" height =3D"200" = alt=3D"Test"> LE> </body> LE> </html> LE> The test went through fine. However it only read the html file = itself, not LE> include the test.gif. =A0The follows are my questions: LE> 1. How to make WebTest to get all the components of a web page = as a web LE> browser does? Currently it is not supported by HTTP::WebTest. I have in my TODO a plugin which would test links on the page but so far I had no time to implement it. LE> 2. If WebTest doesn't work the same way as a web browser, how LE> can I tell the difference in details so that I know which = part LE> is not tested by it? Two main differences is that: 1) HTTP::WebTest doesn't run JavaScript code 2) HTTP::WebTest itself doesn't treat HTML pages in some special way. I.e. it doesn't fetch images, frames, other linked from HTML page resources. Though such capability could be added with plugin. LE> 3. Where can I find a good tutorial and practical examples? For practical examples see perldoc HTTP::WebTest::Cookbook. As for a good introduction tutorial I don't think somebody have wrote one. It is my TODO but it probably will not happen soon. Ed Fancher wrote two articles about HTTP::WebTest but they cover very specific application of this Perl module and hardly qualify as good introduction tutorial. Anyway you may find them interesting: http://www.ethercube.net/articles/Browser%20Version%20Testing/Article.php= http://www.ethercube.net/articles/Browser%20Version%20Testing%20using%20p= lugins/Article.php There are also some examples on http://www.naney.org/encyclopedia/HTTPWebTest.html but it is in Japan. --=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...> - 2003-03-18 18:25:34
|
>>>>> "W" == wsheldah <wsh...@le...> writes: W> Hi, I recently upgraded HTTP::WebTest, and immediately ran into a problem W> with how the auth parameter is handled. I've been specifying my tests with W> a .wt script file, and until now have been able to specify only the W> username in the file, like so: W> auth = ( myname ) W> When I ran the test, it would prompt me to enter my password, to enter it W> again for confirmation, and then run the tests as that user and password. W> The latest version of HTTP::WebTest fails, apparently insisting that I W> store my network password in plaintext in the test file. W> Since this is unacceptable from a security standpoint, it looks like I'm W> forced to switch to putting all the tests into the perl script itself. That W> way I can still prompt for the password and pass the username and password W> as part of the parameters. While I'm glad this option is available, it W> would be nice to have the old behaviour back. Even better would be to W> specify auth = () (or whatever is most intuitive) and have it prompt for W> both username and password. This feature was lost in 1.xx -> 2.xx rewrite by accident. Guess it was not that widely used as it is first bug report about it :) Simpliest workaround is using a new HTTP::WebTest feature which allows evaluation of Perl expressions in wtscript files. You can write for example: test_name = Auth auth = ( "$ENV{USERNAME}" "$ENV{PASSWORD}" ) } url = ..... end_test in this case you'll have to pass username/password as environment variables. Or something like test_name = Auth auth = { print STDOUT "Username: "; my $username = <STDIN>; print STDOUT "Password: "; my $password = <STDIN>; chomp($username, $password); return [ ($username, $password) ]; } url = ..... end_test This will emulate old behavior - i.e. ask for username and password interactively. -- 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...> - 2003-03-18 18:07:29
|
>>>>> "LE" =3D=3D Li, Eddie <Edd...@bg...> writes: LE> Hello, guys, LE> Just installed HTTP::WebTest on my Solaris workstation, I started LE> my first try to use =E2=80=9Cwt=E2=80=9D with a simple wtscript as: LE> =C2=A0=C2=A0=C2=A0 test_name =3D Test page LE> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 url =3D 192.168.6.22/mytest.= html LE> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 min_bytes =3D 13000 LE> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 max_bytes =3D 99000 LE> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 min_rtime =3D 0.010 LE> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 max_rtime =3D 10.0 LE> =C2=A0=C2=A0=C2=A0 end_test LE> mytest.html is as simple as: LE> <html> LE> <body> LE> test LE> <img src =3D "/images/test.gif" width =3D "200" height =3D"200" alt=3D"= Test"> LE> </body> LE> </html> LE> The test went through fine. However it only read the html file itself, = not LE> include the test.gif. =C2=A0The follows are my questions: LE> 1. How to make WebTest to get all the components of a web page as a= web LE> browser does? Currently it is not supported by HTTP::WebTest. I have in my TODO a plugin which would test links on the page but so far I had no time to implement it. LE> 2. If WebTest doesn=E2=80=99t work the same way as a web browser, h= ow LE> can I tell the difference in details so that I know which part LE> is not tested by it? Two main differences is that: 1) HTTP::WebTest doesn't run JavaScript code 2) HTTP::WebTest itself doesn't treat HTML pages in some special way. I.e. it doesn't fetch images, frames, other linked from HTML page resources. Though such capability could be added with plugin. LE> 3. Where can I find a good tutorial and practical examples? For practical examples see perldoc HTTP::WebTest::Cookbook. As for a good introduction tutorial I don't think somebody have wrote one. It is my TODO but it probably will not happen soon. Ed Fancher wrote two articles about HTTP::WebTest but they cover very specific application of this Perl module and hardly qualify as good introduction tutorial. Anyway you may find them interesting: http://www.ethercube.net/articles/Browser%20Version%20Testing/Article.php http://www.ethercube.net/articles/Browser%20Version%20Testing%20using%20plu= gins/Article.php There are also some examples on http://www.naney.org/encyclopedia/HTTPWebTest.html but it is in Japan. --=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: <wsh...@le...> - 2003-03-18 15:10:59
|
Hi, I recently upgraded HTTP::WebTest, and immediately ran into a problem with how the auth parameter is handled. I've been specifying my tests with a .wt script file, and until now have been able to specify only the username in the file, like so: auth = ( myname ) When I ran the test, it would prompt me to enter my password, to enter it again for confirmation, and then run the tests as that user and password. The latest version of HTTP::WebTest fails, apparently insisting that I store my network password in plaintext in the test file. Since this is unacceptable from a security standpoint, it looks like I'm forced to switch to putting all the tests into the perl script itself. That way I can still prompt for the password and pass the username and password as part of the parameters. While I'm glad this option is available, it would be nice to have the old behaviour back. Even better would be to specify auth = () (or whatever is most intuitive) and have it prompt for both username and password. Thanks, Wes Sheldahl |
From: Ed F. <ed....@la...> - 2003-03-13 13:53:44
|
The uploaded file HTTP-WebTest-Plugin-TagAttTest-1.00.tar.gz has entered CPAN as file: = $CPAN/authors/id/E/EF/EFANCHE/HTTP-WebTest-Plugin-TagAttTest-1.00.tar.gz size: 5312 bytes md5: 940013aada679fdc09757f119d70686e NAME HTTP::WebTest ::Plugin::TagAttTest - WebTest plugin providing a = higher level tag and attribute search interface. DESCRIPTION see also = http://search.cpan.org/search?query=3DHTTP%3A%3AWebTest&mode=3Dall This module is a plugin extending the functionality of the WebTest = module to allow tests of the form: my $webpage=3D'http://www.ethercube.net'; my @result; @result =3D (@result, {test_name =3D> "title junk", url =3D> $webpage, tag_forbid =3D> [{ tag=3D>"title", tag_text=3D>"junk"}]}); @result =3D (@result, {test_name =3D> "title test page", url =3D> $webpage, tag_require =3D> [{tag=3D> "title", text=3D>"test page"}]}); @result =3D (@result, {test_name =3D> "type att with xml in value", url =3D> $webpage, tag_forbid =3D> [{attr=3D>"type", attr_text=3D>"xml" }]}); @result =3D (@result, {test_name =3D> "type class with body in value", url =3D> $webpage, tag_require =3D> [{attr=3D>"class", attr_text=3D>"body" }]}); @result =3D (@result, {test_name =3D> "class att", url =3D> $webpage, tag_require =3D> [{attr=3D>"class"}]}) ; @result =3D (@result, {test_name =3D> "script tag", url =3D>$webpage, tag_forbid =3D> [{tag=3D> "script"}]}); @result =3D (@result, {test_name =3D> "script tag with attribute = language=3Djavascript", url =3D> $webpage, tag_forbid =3D> = [{tag=3D>"script",attr=3D>"language",attr_text=3D>"javascript"}]}) ; my $tests=3D\@result; my $params =3D {=20 plugins =3D> = ["::FileRequest","HTTP::WebTest::Plugin::TagAttTest"] }; my $webtest=3D HTTP::WebTest->new; #4 check_webtest(webtest =3D>$webtest, tests=3D> $tests,opts=3D>$params, = check_file=3D>'t/test.out/1.out'); #$webtest->run_tests( $tests,$params); Ed Fancher Ethercube Solutions http://www.ethercube.net PHP, Perl, MySQL, Javascript solutions. |
From: Ed F. <ed....@la...> - 2003-03-10 17:17:41
|
Hi, I'm working on a plugin that I hope is mostly finished to allow for the testing of tags, attributes and their values using a html parser TokeParser. I'm asking for feedback so that I can release the best code possible. The module is available at: http://www.ethercube.net/articles/Browser%20Version%20Testing%20using%20plug ins/Article.php It's called TagAttTest (CPAN requires names less than 11 characters.) Thanks for any help. Ed Fancher Ethercube Solutions http://www.ethercube.net PHP, Perl, MySQL, Javascript solutions. |
From: Ilya M. <il...@ip...> - 2003-03-06 17:49:38
|
>>>>> "JlP" == Johannes la Poutre <joe...@us...> writes: JlP> Ilya, JlP> In addition to may XMLReport plugin I wrought a rough version of a JlP> HTTP::WebTest::Parser module, in order to be able to specify my test JlP> definitions in XML format. JlP> My concern right now is where in the namespace this would fit best; I JlP> chose for HTTP::WebTest::XMLParser for now, but this is open for JlP> discussion. Also I haven't imported this module into the SF CVS for JlP> this same reason. This name is ok by me. JlP> Here's the documentation and tarball of the first alpha: JlP> http://www.xs4all.nl/~jlpoutre/Perl/XMLParser.html JlP> http://www.xs4all.nl/~jlpoutre/Perl/HTTP-WebTest-XMLParser-0.01.tar.gz JlP> Could you take a look at these please? Sure. I'll take closer look a bit later but for now only one suggestion for POD documentation. Instead of use HTTP::WebTest::XMLParser; my ($tests, $opts) = HTTP::WebTest::XMLParser->parse($xmldata); use HTTP::WebTest; my $wt = new HTTP::WebTest; $wt->run_tests($tests, $opts); You can write use HTTP::WebTest; my $wt = new HTTP::WebTest; $wt->parser_package('HTTP::WebTest::XMLParser'); $wt->run_wtscript($xmldata); It is supported since 2.01. -- 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...> - 2003-03-06 17:16:13
|
Ilya, In addition to may XMLReport plugin I wrought a rough version of a HTTP::WebTest::Parser module, in order to be able to specify my test definitions in XML format. My concern right now is where in the namespace this would fit best; I chose for HTTP::WebTest::XMLParser for now, but this is open for discussion. Also I haven't imported this module into the SF CVS for this same reason. Here's the documentation and tarball of the first alpha: http://www.xs4all.nl/~jlpoutre/Perl/XMLParser.html http://www.xs4all.nl/~jlpoutre/Perl/HTTP-WebTest-XMLParser-0.01.tar.gz Could you take a look at these please? Cheers, Joe. |
From: Ilya M. <il...@ma...> - 2003-03-02 12:28:04
|
The URL http://martynov.org/tgz/HTTP-WebTest-2.01.tar.gz has entered CPAN as file: $CPAN/authors/id/I/IL/ILYAM/HTTP-WebTest-2.01.tar.gz size: 87180 bytes md5: d48ea08bd9bb7e4dca52d266f632672f NAME HTTP::WebTest - Testing static and dynamic web content DESCRIPTION This module runs tests on remote URLs containing Perl/JSP/HTML/JavaScript/etc. and generates a detailed test report. This module can be used "as-is" or its functionality can be extended using plugins. Plugins can define test types and provide additional report capabilities. This module comes with a set of default plugins but can be easily extended with third party plugins. CHANGES SINCE LAST STABLE VERSION 2.00: ENHANCEMENTS: * Port self-testing suite from Test to Test::More. * HTTP::WebTest allows to specify non-default parser for wtscript files. * Now HTTP::WebTest::Parser can generate wtscript files from test parameters. DEPRECATIONS: * Subroutines 'start_webserver' and 'stop_webserver' was moved from HTTP::WebTest::SelfTest to HTTP::WebTest::Utils. They still can be exported from HTTP::WebTest::SelfTest but their usage from this module is deprecated. BUG FIXES: * New versions of LWP add Client-Peer header in all responses what breaks one of tests in self-testing suite. This test is fixed so it should pass ok with both new and old versions of LWP. Thanks to Johannes la Poutre for bug report. * Test in self-testing suite for 'timeout' parameter was buggy and could fail on some machines. Thanks to Johannes la Poutre for bug report. * HTTP::WebTest::Plugin::HarnessReport produced report output on STDERR what was adding noise in 'make test' output when being used in Test::Harness-style test suites. -- 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...> - 2003-03-01 11:11:39
|
>>>>> On Sat, 1 Mar 2003 00:16:10 -0300, "Ed Fancher" <ed....@la...> said: Ed> Well, Ed> Loadrunner costs thousands and thousands of dollar for each computer you Ed> want to simulate. The advantage is that it also has some nice reporting and Ed> statistical analysis tools. Ed> WebTest is free, you can use some other Perl modules to do any stat Ed> analysis, but you will have a week or so work to do. I've done something Ed> similar with Perl for a UNIX app. that worked really well and then I used Ed> the GD graphing module and my own statistical routines (just mean, max, ..) Ed> Doing concurrent things with Perl is sometimes difficult because fork() Ed> isn't normally built in, so you will need to get around that with shell Ed> scripts or compile Perl with multithreading, ... I'm considering rewriting testing loop of HTTP-WebTest using POE somewhere in the future. It will allow concurent testing using single process without using threads. -- 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...> - 2003-03-01 11:11:39
|
>>>>> On Fri, 28 Feb 2003 18:31:02 -0500, Jieming Wang <Jie...@en...> said: JW> Hello everyone, JW> A few questions: JW> -How do we compare wt with loadrunner ? JW> -is it possible to use wt to do load testing ? JW> Basically, there are 2 scenarios: JW> 1) login once and access/hit the page in a loop (or repeated, see 10,000 JW> times); JW> 2) from within one script, login multiple times concurrently and hit the JW> resources; HTTP-WebTest was written mainly with functional testing in mind. Its testing loop probably has too high overheat to efficiently test static content (when building HTTP response and anylizing HTTP request takes more time than web server spends on serving the request you simply cannot load the server; at least with single thread/process) but testing of dynamic content should be possible. Paul Hamingson wrote me once that his team was succesfully using HTTP-WebTest for load testing and *cough* he promised to describe his experience when he will have free time *cough*. Ed was correct when he said that HTTP-WebTest neither have builtin support for concurrent testing (i.e. running several requests concurrently) not have builtin support for nice reporting and statistical analysis. It can build on top of HTTP-WebTest using some Perl modules but it takes some time. -- 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: Ed F. <ed....@la...> - 2003-03-01 03:16:23
|
Well, Loadrunner costs thousands and thousands of dollar for each computer you want to simulate. The advantage is that it also has some nice reporting and statistical analysis tools. WebTest is free, you can use some other Perl modules to do any stat analysis, but you will have a week or so work to do. I've done something similar with Perl for a UNIX app. that worked really well and then I used the GD graphing module and my own statistical routines (just mean, max, ..) Doing concurrent things with Perl is sometimes difficult because fork() isn't normally built in, so you will need to get around that with shell scripts or compile Perl with multithreading, ... Ed Fancher Ethercube Solutions http://www.ethercube.net PHP, Perl, MySQL, Javascript solutions. ----- Original Message ----- From: "Jieming Wang" <Jie...@en...> To: <htt...@li...> Sent: Friday, February 28, 2003 8:31 PM Subject: [Http-webtest-general] RE: Http-webtest-general digest, Vlol 1 #69 - 3 msgs > Hello everyone, > > A few questions: > > -How do we compare wt with loadrunner ? > -is it possible to use wt to do load testing ? > > Basically, there are 2 scenarios: > 1) login once and access/hit the page in a loop (or repeated, see 10,000 > times); > 2) from within one script, login multiple times concurrently and hit the > resources; > > Thanks. > Jieming > > -----Original Message----- > From: htt...@li... > [mailto:htt...@li...] > Sent: Tuesday, January 28, 2003 3:07 PM > To: htt...@li... > Subject: Http-webtest-general digest, Vol 1 #69 - 3 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. control the test flow in wtscript? (u.b...@gm...) > 2. Re: control the test flow in wtscript? (il...@ma...) > 3. Re: control the test flow in wtscript? (u.b...@gm...) > > --__--__-- > > Message: 1 > Date: Tue, 28 Jan 2003 17:14:00 +0100 (MET) > From: u.b...@gm... > To: htt...@li... > Subject: [Http-webtest-general] control the test flow in wtscript? > > Hi, > is there an elegant solution for controlling the test flow within a > wtscript? > Is it possible to skip testcases or explicitely to define the successor > testcase? > > I want to run dynamic tests whereby the sequence of testcases may vary > depending on a response. > > in a wtscript there are 6 tests listed: A, B, C, D, E, F > in general these tests run in this sequence > > is it possible to define a test flow like > > A, B, C (if X then D else E, F) > X may be computed in a on_response hook > > if this is not possible (yet) I would try to implement theses tests > splitting the flow into three scripts ((A,B,C), (D), (E,F)) > and managing the flow in the calling perl script... > just another (related) question: > > <example_code> > $webtest->run_wtscript('case1'); > my $content = $webtest->current_response->content; > my ( $Next_Start_URL ) = $content =~ /action='(.+?)'/; > if ( $content =~ /something/ ) { > $webtest->run_wtscript('case2.1'); > } > else { > $webtest->run_wtscript('case2.2'); > } > </example_code> > > is there a possibility to make the $Next_Start_URL > available in the lateron called wtscripts case2.1 > or case2.2? > > sorry if the answers to my questions are obvious, > HTTP::WebTest is new for me. > > Thanks for any help, > Udo > > > > > > > > > -- > +++ GMX - Mail, Messaging & more http://www.gmx.net +++ > NEU: Mit GMX ins Internet. Rund um die Uhr fur 1 ct/ Min. surfen! > > > > --__--__-- > > Message: 2 > From: il...@ma... > To: u.b...@gm... > Cc: htt...@li... > Date: Tue, 28 Jan 2003 19:51:48 +0300 > Subject: [Http-webtest-general] Re: control the test flow in wtscript? > > >>>>> "UB" == u burghardt <u.b...@gm...> writes: > > UB> Hi, > UB> is there an elegant solution for controlling the test flow within a > UB> wtscript? > UB> Is it possible to skip testcases or explicitely to define the successor > UB> testcase? > > UB> I want to run dynamic tests whereby the sequence of testcases may vary > UB> depending on a response. > > UB> in a wtscript there are 6 tests listed: A, B, C, D, E, F > UB> in general these tests run in this sequence > > UB> is it possible to define a test flow like > > UB> A, B, C (if X then D else E, F) > UB> X may be computed in a on_response hook > > UB> if this is not possible (yet) I would try to implement theses tests > UB> splitting the flow into three scripts ((A,B,C), (D), (E,F)) > UB> and managing the flow in the calling perl script... > UB> just another (related) question: > > No, currently HTTP-WebTest doesn't have builtin support for such > control of test flow. Though splitting test case into parts will work. > > UB> <example_code> > UB> $webtest->run_wtscript('case1'); > UB> my $content = $webtest->current_response->content; > UB> my ( $Next_Start_URL ) = $content =~ /action='(.+?)'/; > UB> if ( $content =~ /something/ ) { > UB> $webtest->run_wtscript('case2.1'); > UB> } > UB> else { > UB> $webtest->run_wtscript('case2.2'); > UB> } > UB> </example_code> > > UB> is there a possibility to make the $Next_Start_URL > UB> available in the lateron called wtscripts case2.1 > UB> or case2.2? > > You can use global vars to pass this information into the next test > case: > > test_name = N/A > url = "$main::Next_Start_URL" > end_test > > this example assumes that $Next_Start_URL is declared in package main > and it is a global var (i.e. not 'my'). > > -- > 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 > > > --__--__-- > > Message: 3 > Date: Tue, 28 Jan 2003 18:28:29 +0100 (MET) > From: u.b...@gm... > To: htt...@li... > Subject: [Http-webtest-general] Re: control the test flow in wtscript? > > > UB> <example_code> > > UB> $webtest->run_wtscript('case1'); > > UB> my $content = $webtest->current_response->content; > > UB> my ( $Next_Start_URL ) = $content =~ /action='(.+?)'/; > > UB> if ( $content =~ /something/ ) { > > UB> $webtest->run_wtscript('case2.1'); > > UB> } > > UB> else { > > UB> $webtest->run_wtscript('case2.2'); > > UB> } > > UB> </example_code> > > > > UB> is there a possibility to make the $Next_Start_URL > > UB> available in the lateron called wtscripts case2.1 > > UB> or case2.2? > > > > You can use global vars to pass this information into the next test > > case: > > > > test_name = N/A > > url = "$main::Next_Start_URL" > > end_test > > > > this example assumes that $Next_Start_URL is declared in package main > > and it is a global var (i.e. not 'my'). > > at least for my special question also > $webtest->run_wtscript('case2.1', { url => $Next_Start_URL} ); > will work (I found out), but your solution is more general and can be used > for passing any variables > > thanks for the fast help, > Udo > > -- > +++ GMX - Mail, Messaging & more http://www.gmx.net +++ > NEU: Mit GMX ins Internet. Rund um die Uhr fur 1 ct/ Min. surfen! > > > > > --__--__-- > > _______________________________________________ > Http-webtest-general mailing list > Htt...@li... > https://lists.sourceforge.net/lists/listinfo/http-webtest-general > > > End of Http-webtest-general Digest > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Http-webtest-general mailing list > Htt...@li... > https://lists.sourceforge.net/lists/listinfo/http-webtest-general |
From: Jieming W. <Jie...@en...> - 2003-02-28 23:31:14
|
Hello everyone, A few questions: -How do we compare wt with loadrunner ? -is it possible to use wt to do load testing ? Basically, there are 2 scenarios: 1) login once and access/hit the page in a loop (or repeated, see 10,000 times); 2) from within one script, login multiple times concurrently and hit the resources; Thanks. Jieming -----Original Message----- From: htt...@li... [mailto:htt...@li...] Sent: Tuesday, January 28, 2003 3:07 PM To: htt...@li... Subject: Http-webtest-general digest, Vol 1 #69 - 3 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. control the test flow in wtscript? (u.b...@gm...) 2. Re: control the test flow in wtscript? (il...@ma...) 3. Re: control the test flow in wtscript? (u.b...@gm...) --__--__-- Message: 1 Date: Tue, 28 Jan 2003 17:14:00 +0100 (MET) From: u.b...@gm... To: htt...@li... Subject: [Http-webtest-general] control the test flow in wtscript? Hi, is there an elegant solution for controlling the test flow within a wtscript? Is it possible to skip testcases or explicitely to define the successor testcase? I want to run dynamic tests whereby the sequence of testcases may vary depending on a response. in a wtscript there are 6 tests listed: A, B, C, D, E, F in general these tests run in this sequence is it possible to define a test flow like A, B, C (if X then D else E, F) X may be computed in a on_response hook if this is not possible (yet) I would try to implement theses tests splitting the flow into three scripts ((A,B,C), (D), (E,F)) and managing the flow in the calling perl script... just another (related) question: <example_code> $webtest->run_wtscript('case1'); my $content = $webtest->current_response->content; my ( $Next_Start_URL ) = $content =~ /action='(.+?)'/; if ( $content =~ /something/ ) { $webtest->run_wtscript('case2.1'); } else { $webtest->run_wtscript('case2.2'); } </example_code> is there a possibility to make the $Next_Start_URL available in the lateron called wtscripts case2.1 or case2.2? sorry if the answers to my questions are obvious, HTTP::WebTest is new for me. Thanks for any help, Udo -- +++ GMX - Mail, Messaging & more http://www.gmx.net +++ NEU: Mit GMX ins Internet. Rund um die Uhr fur 1 ct/ Min. surfen! --__--__-- Message: 2 From: il...@ma... To: u.b...@gm... Cc: htt...@li... Date: Tue, 28 Jan 2003 19:51:48 +0300 Subject: [Http-webtest-general] Re: control the test flow in wtscript? >>>>> "UB" == u burghardt <u.b...@gm...> writes: UB> Hi, UB> is there an elegant solution for controlling the test flow within a UB> wtscript? UB> Is it possible to skip testcases or explicitely to define the successor UB> testcase? UB> I want to run dynamic tests whereby the sequence of testcases may vary UB> depending on a response. UB> in a wtscript there are 6 tests listed: A, B, C, D, E, F UB> in general these tests run in this sequence UB> is it possible to define a test flow like UB> A, B, C (if X then D else E, F) UB> X may be computed in a on_response hook UB> if this is not possible (yet) I would try to implement theses tests UB> splitting the flow into three scripts ((A,B,C), (D), (E,F)) UB> and managing the flow in the calling perl script... UB> just another (related) question: No, currently HTTP-WebTest doesn't have builtin support for such control of test flow. Though splitting test case into parts will work. UB> <example_code> UB> $webtest->run_wtscript('case1'); UB> my $content = $webtest->current_response->content; UB> my ( $Next_Start_URL ) = $content =~ /action='(.+?)'/; UB> if ( $content =~ /something/ ) { UB> $webtest->run_wtscript('case2.1'); UB> } UB> else { UB> $webtest->run_wtscript('case2.2'); UB> } UB> </example_code> UB> is there a possibility to make the $Next_Start_URL UB> available in the lateron called wtscripts case2.1 UB> or case2.2? You can use global vars to pass this information into the next test case: test_name = N/A url = "$main::Next_Start_URL" end_test this example assumes that $Next_Start_URL is declared in package main and it is a global var (i.e. not 'my'). -- 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 --__--__-- Message: 3 Date: Tue, 28 Jan 2003 18:28:29 +0100 (MET) From: u.b...@gm... To: htt...@li... Subject: [Http-webtest-general] Re: control the test flow in wtscript? > UB> <example_code> > UB> $webtest->run_wtscript('case1'); > UB> my $content = $webtest->current_response->content; > UB> my ( $Next_Start_URL ) = $content =~ /action='(.+?)'/; > UB> if ( $content =~ /something/ ) { > UB> $webtest->run_wtscript('case2.1'); > UB> } > UB> else { > UB> $webtest->run_wtscript('case2.2'); > UB> } > UB> </example_code> > > UB> is there a possibility to make the $Next_Start_URL > UB> available in the lateron called wtscripts case2.1 > UB> or case2.2? > > You can use global vars to pass this information into the next test > case: > > test_name = N/A > url = "$main::Next_Start_URL" > end_test > > this example assumes that $Next_Start_URL is declared in package main > and it is a global var (i.e. not 'my'). at least for my special question also $webtest->run_wtscript('case2.1', { url => $Next_Start_URL} ); will work (I found out), but your solution is more general and can be used for passing any variables thanks for the fast help, Udo -- +++ GMX - Mail, Messaging & more http://www.gmx.net +++ NEU: Mit GMX ins Internet. Rund um die Uhr fur 1 ct/ Min. surfen! --__--__-- _______________________________________________ Http-webtest-general mailing list Htt...@li... https://lists.sourceforge.net/lists/listinfo/http-webtest-general End of Http-webtest-general Digest |
From: Ilya M. <il...@ma...> - 2003-02-24 20:47:39
|
From: Ed Fancher To: Ilya Martynov Subject: Re: web test article Date: Tue, 18 Feb 2003 16:47:48 -0300 Hi Ilya, Sorry for the slow response, I took some vacation. Sure, you can post a link. I started a work on a plugin version. I should have it ready in a couple of days. Ed. ----- Original Message ----- From: "Ilya Martynov" <il...@ma...> To: "Ed Fancher" <ed....@la...> Sent: Tuesday, February 11, 2003 6:32 PM Subject: Re: web test article >>>>> On Sun, 9 Feb 2003 21:57:20 -0300, "Ed Fancher" <ed....@la...> said: Ed> Hello, Ed> I've written a short article on browser version testing with web tests. I was Ed> wondering if you would mind looking at it and giving some feedback, Ed> improvement ideas, mistakes made, etc.. Ed> Ed> http://www.ethercube.net/articles/Browser%20Version%20Testing/Article.php Hi Ed, Interesting article! I hope you will not mind if I post a link on it to HTTP-WebTest mailling list. Some comments: Probably you it will be cleaner solution to put your code which constructs regexps to verify HTML tags into a HTTP::WebTest plugin. Moreover if you happen to put this code into a plugin you might find that it is easier to just write code to parse HTML page with real HTML parser (like HTML::Parser or XML::LibXML). In general it is more robust approach when it comes to parsing of HTML than using regexps. Actually I was going to do write plugin for HTTP::WebTest which let's to do HTML tree checks via XML::LibXML. Another note is that since you are filtering output of HTTP::WebTest you might find that it is easier to just write your own reporting plugin. Or you could just disable default reporting plugin and get results of tests from HTTP::WebTest object. -- 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: Duncan C. <dca...@bc...> - 2003-02-15 08:20:11
|
On 2003-02-14 Eral TRMB wrote: >Hi, here is a form with two buttons I am trying to test with HTTP-WebTest >v2.00: > ><form METHOD="POST" ENCTYPE="application/x-www-form-urlencoded" >NAME="theForm"> ><table align=center width=100% > ><tr> > <th ALIGN="right">TheForm Header</th> > <td><input TYPE="text" NAME="Thingname" VALUE="Good_name" SIZE=12 >MAXLENGTH=12></td> ></tr> ><tr> > <td ALIGN="right"><input TYPE="submit" NAME="okay" VALUE="Set Name"></td> > <td><input TYPE="button" NAME="cancel" VALUE="Cancel" >ONCLICK="document.location='../otherscript.cgi';"></td> ></tr> ></table> ></form> > > >I would like to test the cancel button with click_button after submitting a >bad name: > >plugins = ( "::Click" ) > >test_name = Cancel bad system name > url = mainscript.cgi # Returns the above form > click_button = Cancel > params = ( Thingname => Bad_name ) > text_require = ( Some text returned by otherscript.cgi ) >end_test > >Well, this test always fail because the answer I receive is as if I had >clicked on the "Set Name" button. > >Would there be a way to test the Cancel button? Is there anything I am doing >wrong? click_button applies only to 'submit' buttons on forms, not to other sorts of buttons. Maybe you could put that button in its own form as it has a separate navigation purpose to the submit button. >PS: It took me quite some time to figure out how to specify two plugins in >the same script. It seems that plugins( "::Plug1" "::Plug2" ) works, but it >would be nice to put it somewhere in the Cookbook. > That's how all list parameters are specified. Regards, Duncan Cameron |
From: Eral T. <era...@ho...> - 2003-02-14 20:10:31
|
Hi, here is a form with two buttons I am trying to test with HTTP-WebTest v2.00: <form METHOD="POST" ENCTYPE="application/x-www-form-urlencoded" NAME="theForm"> <table align=center width=100% > <tr> <th ALIGN="right">TheForm Header</th> <td><input TYPE="text" NAME="Thingname" VALUE="Good_name" SIZE=12 MAXLENGTH=12></td> </tr> <tr> <td ALIGN="right"><input TYPE="submit" NAME="okay" VALUE="Set Name"></td> <td><input TYPE="button" NAME="cancel" VALUE="Cancel" ONCLICK="document.location='../otherscript.cgi';"></td> </tr> </table> </form> I would like to test the cancel button with click_button after submitting a bad name: plugins = ( "::Click" ) test_name = Cancel bad system name url = mainscript.cgi # Returns the above form click_button = Cancel params = ( Thingname => Bad_name ) text_require = ( Some text returned by otherscript.cgi ) end_test Well, this test always fail because the answer I receive is as if I had clicked on the "Set Name" button. Would there be a way to test the Cancel button? Is there anything I am doing wrong? Thank you in advance, =o= kk1 PS: It took me quite some time to figure out how to specify two plugins in the same script. It seems that plugins( "::Plug1" "::Plug2" ) works, but it would be nice to put it somewhere in the Cookbook. _________________________________________________________________ |
From: Ilya M. <il...@ma...> - 2003-01-31 22:59:16
|
>>>>> On Fri, 31 Jan 2003 16:27:53 -0500 (EST), Jagannadh Pariti <jagpariti= @yahoo.ca> said: JP> Hi. I was trying to test uploading a file, but the server that handles = the JP> request complains that the file does not exist. JP> [..snip..] JP> params =3D ( JP> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 name =3D> John JP> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0upload =3D> (file= =3D> /home/john/file_name.txt JP> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Content-Type =3D> 'multipart/form-data' ) JP> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0) Syntax of params block is wrong here. It probably should look like: params =3D ( name =3D> John upload =3D> ( /home/john/file_name.txt ) ) or params =3D ( name =3D> John upload =3D> ( /home/john/file_name.txt=20 file_name.txt ) ) or params =3D ( name =3D> John upload =3D> ( /home/john/file_name.txt=20 file_name.txt Content-Type =3D> text/plain ) ) Some background: When you do file uploads content of form is encoded as multipart MIME data streams (see RFC1867 for explanation) and each parameter is represented as a separate MIME part which can have its own headers. Syntax Explanation: When you specify file upload parameter it is specified as a list which looks like ( FILE, FILENAME, HEADER =3D> VALUE... ) where FILE - is path to file which is sent to the server (optional) FILENAME - filename which appear in the headers of corresponding MIME part (optional) HEADER =3D> VALUE, ... - These parameters let you to specify additional headers for corresponding MIME part. For example they can be used to specify a type of the uploaded file. I.e. text/plain for plain text or image/png for PNG images. --=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...> - 2003-01-31 21:27:59
|
Hi. I was trying to test uploading a file, but the server that handles the request complains that the file does not exist. The basic sequence of tests I run are the following: 1. login as a particular user. 2. Access the page that allows the file upload. 3. Attempt to upload a file. The test block looks like such: test_name = test 1 url = http://someserver.com/upload.pl method = post params = ( name => John upload => (file => /home/john/file_name.txt Content-Type => 'multipart/form-data' ) ) on_request { ... preprocessing } on_response { ... further processing. } end_test Any help would be great... Thanks. Jag --------------------------------- Post your free ad now! Yahoo! Canada Personals |
From: <il...@ma...> - 2003-01-29 19:12:17
|
>>>>> "JP" =3D=3D Jagannadh Pariti <jag...@ya...> writes: JP> Hi. I was wondering if there is any way to provide multiple values for a JP> single parameter. JP> For example, params =3D ( JP> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 id =3D> 1,2 JP> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ) JP> I have been trying various possiblities, but with no luck. Any suggesti= ons JP> would be great. Does following work? params =3D ( id =3D> 1, id =3D> 2 ) --=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...> - 2003-01-29 18:30:40
|
Hi. I was wondering if there is any way to provide multiple values for a single parameter. For example, params = ( id => 1,2 ) I have been trying various possiblities, but with no luck. Any suggestions would be great. Thanks.. Jag --------------------------------- Post your free ad now! Yahoo! Canada Personals |
From: <u.b...@gm...> - 2003-01-28 17:28:37
|
> UB> <example_code> > UB> $webtest->run_wtscript('case1'); > UB> my $content = $webtest->current_response->content; > UB> my ( $Next_Start_URL ) = $content =~ /action='(.+?)'/; > UB> if ( $content =~ /something/ ) { > UB> $webtest->run_wtscript('case2.1'); > UB> } > UB> else { > UB> $webtest->run_wtscript('case2.2'); > UB> } > UB> </example_code> > > UB> is there a possibility to make the $Next_Start_URL > UB> available in the lateron called wtscripts case2.1 > UB> or case2.2? > > You can use global vars to pass this information into the next test > case: > > test_name = N/A > url = "$main::Next_Start_URL" > end_test > > this example assumes that $Next_Start_URL is declared in package main > and it is a global var (i.e. not 'my'). at least for my special question also $webtest->run_wtscript('case2.1', { url => $Next_Start_URL} ); will work (I found out), but your solution is more general and can be used for passing any variables thanks for the fast help, Udo -- +++ GMX - Mail, Messaging & more http://www.gmx.net +++ NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen! |
From: <il...@ma...> - 2003-01-28 16:48:36
|
>>>>> "UB" == u burghardt <u.b...@gm...> writes: UB> Hi, UB> is there an elegant solution for controlling the test flow within a UB> wtscript? UB> Is it possible to skip testcases or explicitely to define the successor UB> testcase? UB> I want to run dynamic tests whereby the sequence of testcases may vary UB> depending on a response. UB> in a wtscript there are 6 tests listed: A, B, C, D, E, F UB> in general these tests run in this sequence UB> is it possible to define a test flow like UB> A, B, C (if X then D else E, F) UB> X may be computed in a on_response hook UB> if this is not possible (yet) I would try to implement theses tests UB> splitting the flow into three scripts ((A,B,C), (D), (E,F)) UB> and managing the flow in the calling perl script... UB> just another (related) question: No, currently HTTP-WebTest doesn't have builtin support for such control of test flow. Though splitting test case into parts will work. UB> <example_code> UB> $webtest->run_wtscript('case1'); UB> my $content = $webtest->current_response->content; UB> my ( $Next_Start_URL ) = $content =~ /action='(.+?)'/; UB> if ( $content =~ /something/ ) { UB> $webtest->run_wtscript('case2.1'); UB> } UB> else { UB> $webtest->run_wtscript('case2.2'); UB> } UB> </example_code> UB> is there a possibility to make the $Next_Start_URL UB> available in the lateron called wtscripts case2.1 UB> or case2.2? You can use global vars to pass this information into the next test case: test_name = N/A url = "$main::Next_Start_URL" end_test this example assumes that $Next_Start_URL is declared in package main and it is a global var (i.e. not 'my'). -- 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 |