Forum Discussion
Thomas_Bonds
15 years agoOccasional Contributor
I'm using SOAPUI 3.6.1 and I'm trying to run tests in a REST based project.
This code works when I run the test step all by itself:
But when I try to run the test step by running the test case that contains the test step, I get
this error:
I just want to test if the response status code is 201.
What am I doing wrong?
This code works when I run the test step all by itself:
if( context.httpResponse == null )
return
def content = context.httpResponse.responseContent
assert content.ResponseStatusCode != 201
But when I try to run the test step by running the test case that contains the test step, I get
this error:
Cannot get property 'ResponseStatusCode' on null object
I just want to test if the response status code is 201.
What am I doing wrong?