[Webtest] Unconditionally executing some steps

Curelea, Alexandru webtest@lists.canoo.com
Thu, 5 Jan 2006 12:00:19 -0500


Hi all,

First, to the developers, thank you for an excellent tool.

I'm running into the following difficulty using Webtest.  Each of my =
tests has a few clean-up steps at the end, which delete data that was =
created during the test.  If this data isn't removed, any tests that =
follow will most likely fail due to conflicts.  The data involves IDs =
generated at runtime, which I'm capturing, storing and using as dynamic =
properties.

My problem is that if any of the steps in the test fail, the cleanup =
steps don't get executed.  The "haltonerror" and "haltonfailure" config =
options don't seem to help, because on a failure the execution still =
stops during the current webtest.  I've tried putting the cleanup steps =
in a separate webtest and even in a separate target, but in these cases =
I can't seem to access the values of the dynamic properties (unless I'm =
doing something wrong?)

Does anyone know how I could get this to work?  It is the only problem =
I've had with Webtest so far, but unfortunately it would effectively =
prevent us from running test suites, since the first failure would =
indirectly cause all the following tests to fail.

Thanks for any ideas.

Alex