Hi,

there is (at least currently) no "finally" functionality in WebTest.

I see following solutions:
- share the session informations to reuse them in different <webtest>.
All tests would use the same server session which has advantages and
drawbacks
- register a build listeners that executes some call when it detects
that the <steps> failed
- write own step container that allows to specify a "finally" section.
This is surely what allows to write the "nicest" scripts and provides
the most information in the reports. This is probably only a few lines
of Groovy code ;-)

Marc.
-- 
Blog: http://mguillem.wordpress.com

Stefan Seger wrote:
> Hello,
> 
> I have the following problem and I don't know how to solve it:
> 
> I'm testing a webapplication in which you have to login. Each user can only
> be logged in once. So all my tests starts with the login of this user. Then
> there are different steps which the user should execute. At the end of the
> test the user logs out.
> 
> The problem is: when one step fails the whole webtest stops. Therefore the
> user will not be logged out and the session is still open. In this case I
> have to restart the whole application, because I don't get the user out.
> 
> My question is if there is some functionality as finally, where I can say
> "If a step fails you MUST execute these steps before stopping the webtest". 
> 
> Thanks in advance for your help,
> Stefan

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to