Hi,
Just reading back catalog of topics on the mailing list having
questioned to myself whether tests could continue a step failure and I
found this thread.
Personally I think there is some value in having a soft step failure,
i.e. a step failure that does not cause subsequent steps in a webtest
to fail. For example I have a test case that involves multiple forms
and I want to verify the title of each form as I go through the
flow. I ran this test and it failed on the second form because the
title on the second page was not correct. That's fine - because
that's a failed test, however this failure does not in reality prevent
the functional flow from continuing, the second form can still be
filled in and run OK. Now I could out the tests into separate
webtests, and I could write the steps as macrodefs (or Groovy closures
as I'm writing tests in Groovy), but this seems an unnecessary
abstraction when I have a single script which I'd like to cover
various functional aspects.
For example my groovy test script might be written as ...
webtest("test name") {
group login
verifyTitle 'Title 1'
group inputForm1.curry(name:'Test',age:
65,sex:'Female',smoker:'No')
verifyTitle 'Title 2'
group inputForm2.curry(name:'Test',age:65,sex:'Male',smoker:'No')
verifyText 'Title 3'
}
(where login, inputForm1 and inputForm2 are closures defining how I
log in and fill in the two forms)
Having a construct where I could identify one of the steps as a soft
failure, e.g.
soft { verifyTitle 'Title 2' }
would be extremely useful, keep my test as a single script and allow
me to identify steps which do not break the flow on failure.
What's the general consensus on this and would this approach be
something that would be considered?
Ian
--
Ian Homer
mobile ... made simple
http://bemoko.com | twitter: ianhomer
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest