Web Service Request, unable to set url port with a variable

Hi,

I am currently working on Web Service testing, and I have encountered a problem.
While setting the url to hit with a host variable and a port one, I am unable to save and get an blank error panel.
My url should be in the http://${host}:${port}/ format. After some tests, it appears that the error occurs when the character $ follow the character :, only in the current version (5.10.1).

Below a screen of the error I get:
KATALON_ERROR

Regards,
Odin

have you tried escaping the character?

WebUI.openBrowser('http://$/{host}:${port}/', FailureHandling.CONTINUE_ON_FAILURE)

or

WebUI.openBrowser('http:///${host}:${port}/', FailureHandling.CONTINUE_ON_FAILURE)

Pretty sure it’s the first one

Hi, thank’s for answering, but the problem is not here, it’s my Web Service Request Object that get an error.

Hi @odin.servely,
Can you send us the error log file? You can get it via Help -> Error Log

Hi @huynguyen,
Sure, the error I get is a null pointer exception, I had to convert in .txt to upload otherwise non authorized.
The error is the latest.
log.txt (751.2 KB)

@odin.servely,
We have investigated the issue and found the root cause. The problem lies in Katalon’s lack of support for parsing URL when port is defined as a variable, not a number. We will improve this in the next release of Katalon Studio. In the mean time, can you try defining the host and port as a whole, with a single variable? I suppose they often go together in test scenarios. Correct me if I’m wrong :smiley:

@huynguyen,
Thank’s for your answer, I ended up doing it in a single variable !
Separate the port and host is useful for us because we use them both distinctly for our environment, but there’s no big deal using a single variable.
Just catchin the error :grin:
Thank’s again !

1 Like

@odin.servely, the issue has been fixed since version 6.0.6. You can download new versions and try it out.
Regards.

1 Like

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