Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to post values in SOAPUI in rest

Tags:

rest

soapui

I am analyzing SoapUI for Rest services and cant get my head around on how to post values in a request. There are options available to send the values in a querystring or header (query/template/header/matrix/plain) but I am not sure if any of these is what I need. I have tested my Rest service using a simple HTML client and calling the jquery post method and there are no problems with the service. I am curious to know if I need to provide WADL or provide the json representation of the request to get the response. At this moment SOAPUI seems to be hard to make it work for testing Rest services.

like image 913
man_luck Avatar asked Aug 13 '14 13:08

man_luck


People also ask

Can we use SoapUI for REST?

Support for SOAP and REST API Testing. Easy multi-environment switching. Detailed test history and test comparison reporting.

What is post method in SoapUI?

In other words, if PUT is used as a URI that contains the value of a non-existent resource ID. POST is used to create new resources and provide the client-defined ID in the body representation. On successful update, it returns 200 (or 204 if not returning any content in the body) from a PUT.


1 Answers

Their help section provides the answer; http://www.soapui.org/REST-Testing/understanding-rest-parameters.html section 1.3.

"If you are simulating HTML Form submits, you might want to them to use the POST method instead. If we create a corresponding REST Method using the POST (or PUT) verb you will get an option to post query-parameters in the body instead"

The screenshot describes the options to select. Its the checkbox at the bottom of the screenshot which needs to be checked; "Post QueryString".

Post options

like image 140
man_luck Avatar answered Oct 20 '22 08:10

man_luck