Warning: fopen(/tmp/SghXTngBZPli-QNsqDv.tmp): failed to open stream: Disk quota exceeded in /home/executea/public_html/blog/wp-admin/includes/class-wp-filesystem-ftpext.php on line 139
Warning: unlink(/tmp/SghXTngBZPli-QNsqDv.tmp): No such file or directory in /home/executea/public_html/blog/wp-admin/includes/class-wp-filesystem-ftpext.php on line 142
API Testing in Katalon Studio – POST request and verify
In our last post, we discussed how to work with Katalon Studio GET operation and understand how to work with Katalon studio API Testing. In this video, we will discuss how to work with PUT request of API using Katalon studio.
In this post, we will discuss following
POST operation with Katalon Studio via Object Repository (UI)
Understanding the passing of body via Katalon Studio
Calling the POST and passing the body via Script
Catching exception to see if we make any mistakes while calling
Check the POST operation by an GET
GET via Parameter for exact POST
Verify the element and other objects of JSON response body
Here is the complete video of the above discussion
Here is the complete source code of the above video discussion
https://gist.github.com/executeautomation/72292183031b45e70445d27593d55e2c
Thanks for reading the post and watching the video!!!
Please leave your comments and let me know if there is anything I should update in this post.
Thanks,
Karthik KK
Post Author:
Karthik kk
4 Replies to “API Testing in Katalon Studio – POST request and verify”
hi Karteek, Greetings.
I am trying to automate SOAP web service in Katalon Studio. For the wsdl which i have configured, i am able to see all the methods once i click on Load from WSDL button and added all required headers and request body with token and other values. But i am getting below error .
and Proxy Option selected as No Proxy under preferences. Please find the below stack trace.
Any help?
(Stack trace: com.kms.katalon.core.webservice.exception.WebServiceException: No service operation was found
at com.kms.katalon.core.webservice.common.SoapClient.parseService(SoapClient.java:112)
at com.kms.katalon.core.webservice.common.SoapClient.lookForService(SoapClient.java:98)
at com.kms.katalon.core.webservice.common.SoapClient.parseWsdl(SoapClient.java:85)
at com.kms.katalon.core.webservice.common.SoapClient.send(SoapClient.java:143)
at com.kms.katalon.controller.WebServiceController.sendRequest(WebServiceController.java:37)
at com.kms.katalon.composer.webservice.parts.SoapServicePart$4.run(SoapServicePart.java:222)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
)
I am just trying post request with below payload. But in response, I am getting Unexpected token o in JSON at position 1 error
My Payload:
{“panel_id”: “12345,”recipe_timer_number”: “0”,”timer”:{“name”:”Example Recipe Timer”,”description”:”This is an example recipe timer object using day of week”,”from”:{“hours”:9,”minutes”:0,”day”:”Monday”},”to”:{“hours”:17,”minutes”:30,”day”:”Monday”}},”is_test”: “0”}
Hi,
This post really helped me. Thanks.
hi Karteek, Greetings.
I am trying to automate SOAP web service in Katalon Studio. For the wsdl which i have configured, i am able to see all the methods once i click on Load from WSDL button and added all required headers and request body with token and other values. But i am getting below error .
and Proxy Option selected as No Proxy under preferences. Please find the below stack trace.
Any help?
(Stack trace: com.kms.katalon.core.webservice.exception.WebServiceException: No service operation was found
at com.kms.katalon.core.webservice.common.SoapClient.parseService(SoapClient.java:112)
at com.kms.katalon.core.webservice.common.SoapClient.lookForService(SoapClient.java:98)
at com.kms.katalon.core.webservice.common.SoapClient.parseWsdl(SoapClient.java:85)
at com.kms.katalon.core.webservice.common.SoapClient.send(SoapClient.java:143)
at com.kms.katalon.controller.WebServiceController.sendRequest(WebServiceController.java:37)
at com.kms.katalon.composer.webservice.parts.SoapServicePart$4.run(SoapServicePart.java:222)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
)
Thanks in Advance.
Regards,
Anuradha
Hi please let me know why u had made post API as GET afterwards for verification
Hi,
I am just trying post request with below payload. But in response, I am getting Unexpected token o in JSON at position 1 error
My Payload:
{“panel_id”: “12345,”recipe_timer_number”: “0”,”timer”:{“name”:”Example Recipe Timer”,”description”:”This is an example recipe timer object using day of week”,”from”:{“hours”:9,”minutes”:0,”day”:”Monday”},”to”:{“hours”:17,”minutes”:30,”day”:”Monday”}},”is_test”: “0”}
Please suggest