Size: 724
Comment:
|
Size: 806
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 20: | Line 20: |
* http://www.soapui.org/scripting---properties/the-soapui-object-model.html |
SoapUI
Rest OnRequest sample Groovy
http://www.soapui.org/apidocs/com/eviware/soapui/impl/rest/mock/RestMockRequest.html
http://www.soapui.org/apidocs/com/eviware/soapui/impl/rest/mock/RestMockResult.html
https://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletResponse.html
https://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html
import com.eviware.soapui.impl.rest.mock.RestMockResult RestMockResult res = new RestMockResult( mockRequest ) String val ="{test:1234}" mockRequest.httpResponse.writer << val mockRequest.httpResponse.status = 200 mockRequest.httpResponse.header = "Content-type: application/json" mockRequest return res