[Webtest] [dev] StepFailedException versus StepExecutionException

Marc Guillemot webtest@lists.canoo.com
Fri, 24 Feb 2006 09:17:36 +0000 (UTC)


Hi,

we currently throw StepFailedException or StepExecutionException when a test
doesn't pass but I'm not sure to know exactly what we want to differentiate with
these 2 exceptions or if we do it consistently.

For me a StepFailedException should be reserved to cases like:
- verification steps: when the verification fails (this is what we do)
- action steps: when the action can't be done, for instance no link can be found
in a clickLink (this is what we do too)

All (?) other cases should use a StepExecution exception, for instance when:
- the parameters of a step are incorrect (this is already what is done)
- a page request can't be executed correctly (ex: http error code received, or a
socket timeout occurs, or a JS error occurs) => this is NOT what we currently do.

Any thoughts?

Marc.