Re: print result.text

Joan Picanyol i Puig <[email protected]> Fri, 2 Sep 2016 10:53:24 +0200
Newsgroups gmane.comp.java.grinder.user
Message-ID <[email protected]>
Sorry, but I can't understand the issue you are having :(

If the system under test return HTTP 200 status there's not much grinder
can do about it.

* Alan Jackson <pure_jax-/[email protected]> [20160902 10:10]:
> Unfortunately not maybe I am going about this the wrong way.
> The main aim is to get a response back from a URL however currently even =
if the DB is unavailable the response code comes back 200 OK
> =

> =

>       From: Joan Picanyol i Puig <[email protected]>
>  To: [email protected] =

>  Sent: Thursday, September 1, 2016 5:32 PM
>  Subject: Re: [Grinder-use] print result.text
>    =

> * Alan Jackson <pure_jax-/[email protected]> [20160901 17:11]:
> > Hi,
> > Can anyone help me write the output of a URL to the out.log file or ano=
ther log file
> > Currently I have: -
> > # =A0 =A0 =A0 tests[2].POST(searchUrl + sessionCookie,=A0 =A0 =A0 =A0 r=
esult =3D tests[14].POST('http://cathp60:7002//search-customer.do' + sessio=
nCookie,=A0 =A0 =A0 =A0 =A0 ( NVPair('mpn', '07935139299'),=A0 =A0 =A0 =A0 =
=A0 =A0 NVPair('accountId', ''),=A0 =A0 =A0 =A0 =A0 =A0 NVPair('contactType=
', 'User'), ))=A0 =A0 =A0 =A0 print result.text=A0 =A0 =A0 =A0 #WriteToFile=
(result.text)
> > The print result.text will output the result on the command line howeve=
r I need to record this result into the log file.
> > I tried WriteToFile(result.text) however this just returned an error.
> > Can someone please advise?
> =

> Doesn't logging it do what you want?
> =

> =A0 =A0 from net.grinder.script.Grinder import grinder
> =A0 =A0 grinder.logger.info(result.text)
> =

> http://grinder.sourceforge.net/g3/script-gallery.html#helloworld.py
> =

> http://grinder.sourceforge.net/g3/logging.html
> =

> qvb
> -- =

> pica
> =

> -------------------------------------------------------------------------=
-----
> _______________________________________________
> grinder-use mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/grinder-use
> =

>    =



-- =

pica

---------------------------------------------------------------------------=
---