Forum Discussion
Hi,
Like Rao said, we need a few more details, the functionality should definitely work. Here is my mock setup for reference:
The output you can see in the (script) log is the result of me making a GET request of: http://localhost:9090/test?p=hello
Regards,
Rup
Using rupert_anderson 's code, the green 'play' button pops up the 'mockRequest is Null' warning, because the mock request object is not def'd up.
The mockRequest object is defined when a 'real' test executes the MockService endpoint.
To test code while writing it I put the following TestCode code and click 'play' until I am done.
Then I send a Test Step to call the MockService endpoint:
def mockRequestrequestContent = ""
if (mockRequest != null)
mockRequestrequestContent = mockRequest.requestContent
else
mockRequestrequestContent = "<testRequestXmlOrJson/>"
log.info(mockRequestrequestContent)
//begin script
Note: The current version of SoapUI 5.50 doesn't have a log window at the bottom, trying to gather information to reply to your solution was challenging. I am new here, so might have missed a config setting somewhere :-)