You can use string bean keys in ok string.
grinder.test0.parameter.ok=3D<getIsOk>
- Phil
> -----Original Message-----
> From: Eric COQUELIN [mailto:eric.coquelin@...]
> Sent: 17 June 2004 08:13
> To: Philip Aston
> Subject: Re: [Grinder-use] how to catch errors ?
>=20
>=20
>=20
> Phil,
>=20
> I know that G3 is much more adapted for what I want to do=20
> but in my case, I
> have to use G2.
> I know that the OK string is a solution but the string is=20
> static and in my
> tests, messages are variables and I have never the same=20
> error string... Is
> there another way ?
>=20
> Thanks
>=20
> =C9ric
>=20
> ----- Original Message -----
> From: "Philip Aston" <paston@...>
> To: "Eric COQUELIN" <ecoqueli@...>;
> <grinder-use@...>
> Sent: Wednesday, June 16, 2004 9:05 PM
> Subject: RE: [Grinder-use] how to catch errors ?
>=20
>=20
> >
> > Eric COQUELIN writes on 16 June 2004 14:48:
> > >
> > > By default, the Grinder 2.8 generates errors when a page is
> > > unavailable on a server. I have developped a specific=20
> JAVA source
> > > to handle HTTP response and process HTML content. In some case I
> > > would like to notify an error when conditions are not met.
> > >
> > > For the moment, I use handleResponse() function but, I can only
> > > throw exception but it prints stacks on the standard output. Is
> > > there another function or another way to notify a clean error ?
> >
> > This kind of thing is much easier and more transparent in G3.
> >
> > As a work around for G2, you could add an OK string to=20
> your test which
> > contains a string bean key. Based on the success or failure of the
> > test, the string bean could return a value for the key=20
> whcih would be
> > either "" (which will be found in any non-null response body) or a
> > string that you know isn't in the response body (perhaps=20
> "ERORR - some
> > descriptive message).
> >
> >
> > - Phil
> >
>=20
>=20
>=20
> Our name has changed. Please update your address book to=20
> the following format: "recipient@...".
>=20
> This message contains information that may be privileged or=20
> confidential and is the property of the Capgemini Group. It=20
> is intended only for the person to whom it is addressed. If=20
> you are not the intended recipient, you are not authorized=20
> to read, print, retain, copy, disseminate, distribute, or=20
> use this message or any part thereof. If you receive this =20
> message in error, please notify the sender immediately and=20
> delete all copies of this message.
>=20
>=20
|