10/29/2015:
- Current version of the tool is 5.2.0
-
Steps to start testing Web Service:
- Current version of the tool is 5.2.0
-
Steps to start testing Web Service:
- Create Project
- Add WSDL web service url for the service that you wanted to test
Note:Generally basic level difference between SOAP and REST based SOAP UI tool
1. If the web service is a SOAP then it will have Interface, if it is REST based then it will have service.
2. Inside Interface you will have Operations (SOAP web services)
And in Service you will have Resource (REST based web services)
3. Inside Operations you have Requests. And then Request will have methods inside it.
And inside Resource you have Methods. And inside Method you will see Request.
4. The methods that are available in SOAP are mostly get and set. Here the operations are going and getting back the information.
But in REST, it would be GET, POST, PUT, Delete, Head, Options, Trace and Patch
5. In SOAP you have Request , End Point and Response .
In REST - you input parameters instead of Input request. Similar to SOAP UI you can also send xml along with your message. Set it to POST method and include any kind of XML(media type window..) that you wanted to send.
6. SOAP based web services only handles XML based formats in the request.
REST based accepts data of format XML, HTML, JSON and Rawdata...
6. SOAP based web services only handles XML based formats in the request.
REST based accepts data of format XML, HTML, JSON and Rawdata...
7 . Request and Response:
SOAP:
Request and Response of SOAP based on service follows standard xml structure. Soap Envelop, Soap Header and Soap Body
Soap Body in the Request - is user defined. '?' in the Body means where you could provide your input.
In the Request you could see POST that means, SOAP uses POST method every time during the request and REST has many methods to use.
REST:
Update the parameter value in the request and then click on play button to execute.
In the Response you will have four types of formats to view the Response - XML, JSON, Raw, HTML. If you don't see response in XML format then you could change the format to view accordingly.
JSON format - starts with curly braces. Inside braces, you have 'responseData' that is a root node and then 'results'.
8. Executing the request is simple, just click on the play button once the request xml or parameters are ready.
SOAP:
Request and Response of SOAP based on service follows standard xml structure. Soap Envelop, Soap Header and Soap Body
Soap Body in the Request - is user defined. '?' in the Body means where you could provide your input.
In the Request you could see POST that means, SOAP uses POST method every time during the request and REST has many methods to use.
REST:
Update the parameter value in the request and then click on play button to execute.
In the Response you will have four types of formats to view the Response - XML, JSON, Raw, HTML. If you don't see response in XML format then you could change the format to view accordingly.
JSON format - starts with curly braces. Inside braces, you have 'responseData' that is a root node and then 'results'.
8. Executing the request is simple, just click on the play button once the request xml or parameters are ready.
How to make out its a SOAP or REST based service in a tool?
ReplyDeleteGenerally for SOAP based, tester would be provided with .WSDL file or url to test.
DeleteIn REST based, you have .WADL file or url, that url that has Endpoint, Resource and Parameters(? symbol with the parameters and & to separate the parameters).
Purely based on the webservice url or the file we receive to test, we can make out whether its SOAP or REST Web Service.
Following url and request details are provided for SOAP testing. I was told to create REST project and process with request.
ReplyDeleteurl: https://gold-xxxxxxxxxx:8443/tempspender/customer/offer/xxxxxxxx
Request:
{
"common": {
"xxx": "xxxx",
"xxxx": "xx",
"xxxx": "xxxxx",
"xxxx": "xxx",
"xxx": "07/07/2015",
"xxxx": "02:30:59.3059",
"xxxx": "9999999999"
},
"requestData": {
"ddd": "xxxxx",
"xxxx": "25490",
"xxxx": "A"
}
}