[Http-webtest-general] control the test flow in wtscript?
Brought to you by:
m_ilya,
richardanderson
From: <u.b...@gm...> - 2003-01-28 16:14:08
|
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 für 1 ct/ Min. surfen! |