[Webtest] Design of com.canoo.webtest.steps.Step
Daniel Sheppard
webtest@lists.canoo.com
Thu, 1 May 2003 12:00:57 +1000
Firstly, why is it being made final? What consequences are there in a ste=
p overriding this method?
I'm not sure I'm completely grokking your situation.=20
1) You're telling your task to go to a page.
2) HttpUnit is failing to go to this page.
3) You want your test to still succeed?
Does the haltonfailure / haltonerror settings on testspec not cover this?=
> -----Original Message-----
> From: Marc Guillemot [mailto:mguillemot@yahoo.fr]
> Sent: Wednesday, 30 April 2003 7:59 PM
> To: WebTest@gate.canoo.com
> Subject: [Webtest] Design of com.canoo.webtest.steps.Step
>=20
>=20
> Hi,
>=20
> I think in the class com.canoo.webtest.steps.Step, the method
> execute(Context context) should be made final and should catch the
> exceptions that may happen to throw a clean=20
> StepFailedException exception.
>=20
> This means change:
> -----------------------
> public void execute(Context context) {
> expandProperties();
> notifyStarted(context);
> doExecute(context);
> notifyCompleted(context);
> }
>=20
> -----------------------
> to:
> -----------------------
> public final void execute(Context context) {
> try
> {
> expandProperties();
> notifyStarted(context);
> doExecute(context);
> notifyCompleted(context);
> }
> catch (Exception _e) {
> throw new StepFailedException(_e.getMessage(), this);
> }
> }
> -----------------------
>=20
> This would allow a testsuite to run even if one test throw an=20
> exception (in
> my case a <followframe> became an http return code 500 and
> com.meterware.httpunit.WebClient.validateHeaders throws an exception).
>=20
> Any comment?
>=20
> Marc.
>=20
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>=20
#########################################################################=
############
This email has been scanned by MailMarshal, an email content filter.
#########################################################################=
############