cancel
Showing results for 
Search instead for 
Did you mean: 

How to access http status from Groovy script?

New Contributor

How to access http status from Groovy script?

Hi,

I would like to create a groovy script assertion based on http status code check.  How can I do this?

Thanks,

Giri.
2 REPLIES 2
Super Contributor

Re: How to access http status from Groovy script?

Hi!

check the status code with something like

assert messageExchange.responseStatusCode == 200

(since 2.5 version)

regards!

/Ole
eviware.com
New Contributor

Re: How to access http status from Groovy script?

Hi Ole,

Thank you verymuch for quick answer. 

Giri.
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors