Katalon does not accept my test data entries as int type

For reference, I am using Katalon Studio Vestion 6.0.6 Build 4

I am trying to use Test Data to create a test case, where I call the same test multiple times with various combinations of data like credentials, request parameters, etc. The test case just makes the call with the specified parameters grabbed from the Test Data, and then just validates the response code, which is also specified as an expectedResponseCode column in the test data.

Most of this process has worked fine. My Test suite runs, it runs the test case for each column in the test data, and it seems to read the test data in correctly and pass it on down to the test case.

The problem comes from variable types. Despite the fact that my expected response codes are all Integers in the test data, Default value is Integer, and the test case variable it’s mapped to is a Number, the test step for Verify Response Status Code errors, telling me that there is no method signature that allows me to pass in a String (I added the error message below).

What’s the point of defining my Test Variable as a Number if Katalon is just going to treat it as a String?
There doesn’t appear to be any way to define the typing of the test data or the mapping either.

For the record, when I go into Script mode, and explicitly type the method parameter using as int, the call goes through fine.

I’ve attached various screenshots showing my test data column, test suite mapping, test case flow, test case varaibles, and my workaround.


08%20PM
21%20PM

36%20PM

verifyResponseStatusCode(response, expectedResponseCode) FAILED.

Reason:

groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords.verifyResponseStatusCode() is applicable for argument types: (com.kms.katalon.core.testobject.ResponseObject, java.lang.String) values: [400 458 bytes, 200]

Possible solutions: verifyResponseStatusCode(com.kms.katalon.core.testobject.ResponseObject, int),

Is anyone looking into this? I feel like this is a really basic use case, and shouldn’t have to put in a code hack to make it work.

Hi @aryan

Thank you for reporting. We are looking into this issue and will let you know.

Cheers !

Hi @aryan
Katalon is currently always parsing entries from Excel as Strings, that’s why you need the cast (as int). We have noted this issue and will look into it in the future. In the mean time please use the workaround. Sorry for the inconvenience !

Hello,
no more news on this issue ?
I have same problem on Katalon 7.5.10

for a field “qteMini” mapped from Excel file as a number, when I use it in simple

if (nbPal < qteMini) {

I get following Exception :

2020-07-21 17:56:09.021 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: Test Cases/Common Test Cases/creationStockGeiMini FAILED.
Reason:
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at creationStockGeiMini.run(creationStockGeiMini:25)

variable tab of my creationStockGeiMini :

test suite with Excel file mapping :

VZ8xJlzdo.png)