Bug : Katalon 7 : Web service request : Issue when api call return no content, HTTP 204

Hello

Am using Katalon 7 beta version
Have web service project

I have REST API call, where i expect No content http 204 response
It gives Null pointer exception error with following error logs, and send request do not work. where as same request woks in stable Katalone version of 6.3.3

Reason:

com.kms.katalon.core.exception.StepFailedException: Unable to send request (Root cause: java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:882)
at com.google.common.net.MediaType.parse(MediaType.java:825)
at com.kms.katalon.core.webservice.common.RestfulClient.response(RestfulClient.java:200)
at com.kms.katalon.core.webservice.common.RestfulClient.sendRequest(RestfulClient.java:97)
at com.kms.katalon.core.webservice.common.RestfulClient.send(RestfulClient.java:56)
at com.kms.katalon.core.webservice.keyword.builtin.SendRequestKeyword$_sendRequest_closure1.doCall(SendRequestKeyword.groovy:42)
at com.kms.katalon.core.webservice.keyword.builtin.SendRequestKeyword$_sendRequest_closure1.call(SendRequestKeyword.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:68)
at com.kms.katalon.core.webservice.keyword.builtin.SendRequestKeyword.sendRequest(SendRequestKeyword.groovy:38)
at com.kms.katalon.core.webservice.keyword.builtin.SendRequestKeyword.execute(SendRequestKeyword.groovy:33)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:60)
at com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords.sendRequest(WSBuiltInKeywords.groovy:40)
at com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords$sendRequest.call(Unknown Source)
at Standard run - No EE in payroll - Verify no content is returned.run(Standard run - No EE in payroll - Verify no content is returned:16)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1569553911007.run(TempTestCase1569553911007.groovy:23)
)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:50)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:70)
at com.kms.katalon.core.webservice.keyword.builtin.SendRequestKeyword.sendRequest(SendRequestKeyword.groovy:38)
at com.kms.katalon.core.webservice.keyword.builtin.SendRequestKeyword.execute(SendRequestKeyword.groovy:33)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:60)
at com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords.sendRequest(WSBuiltInKeywords.groovy:40)
at com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords$sendRequest.call(Unknown Source)
at Standard run - No EE in payroll - Verify no content is returned.run(Standard run - No EE in payroll - Verify no content is returned:16)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1569553911007.run(TempTestCase1569553911007.groovy:23)
Caused by: java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:882)
at com.google.common.net.MediaType.parse(MediaType.java:825)
at com.kms.katalon.core.webservice.common.RestfulClient.response(RestfulClient.java:200)
at com.kms.katalon.core.webservice.common.RestfulClient.sendRequest(RestfulClient.java:97)
at com.kms.katalon.core.webservice.common.RestfulClient.send(RestfulClient.java:56)
at com.kms.katalon.core.webservice.keyword.builtin.SendRequestKeyword$_sendRequest_closure1.doCall(SendRequestKeyword.groovy:42)

Hi @musaffir.puthukudi,
Can you share your request (.rs) file?
Regards

Please find it here

<?xml version="1.0" encoding="UTF-8"?> DemoAPI derwaeww-342w-4388-95b2-frtwacdwwwq BASIC false false true equals Authorization Main Basic YXVwefwefwefGlvbisdffdwdwerwefwerf43232345234dsv 5.4.1 GET https://myService.net/app/services/v1/employees?criteria=EmpByRun&payrollrunid=85670 RESTful import static org.assertj.core.api.Assertions.*

import com.kms.katalon.core.testobject.RequestObject
import com.kms.katalon.core.testobject.ResponseObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webservice.verification.WSResponseManager

import groovy.json.JsonSlurper
import internal.GlobalVariable as GlobalVariable

RequestObject request = WSResponseManager.getInstance().getCurrentRequest()

ResponseObject response = WSResponseManager.getInstance().getCurrentResponse()


Hi @musaffir.puthukudi,
We will take a look into this issue.
Regards.

1 Like

Hi @musaffir.puthukudi,
This issue will be fixed in release 7.0.0. Please download the beta version here https://github.com/katalon-studio/katalon-studio/releases
Regards

2 Likes

Thank you @huynguyen

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.