I have a Web Service project where I test APIs.
In some cases, my test suite/ test case is successful if I start the Test suite directly in Katalon.
But when calling the test suite in jenkins via command line it fails with an error.
(I think I also noticed other small discrepancies in the past like slightly different decimals for numbers with a lot of decimals)
It would be very helpful if I could see the error already when I start my test suite directly in Katalon. Do you have any idea why I get a different result for starting the test suite directly in Katalon and for calling the test suite via command line? How can I achieve the same behavior for both scenarios?
Here an example:
I wanted to use getElementPropertyValue to get the “KI_ISOELECTRIC_POINT” from my resonse.
The response json looks like this:
{
(...)
"KI_ISOELECTRIC_POINT":6.24
(...)
}
a) I tested with Katalon Version 8.6.9 (JavaSE-1.8) as well as with Katalon Version 10.1.0 (JavaSE-17) by starting the Test suite directly in Katalon and it is successful:
Hi Monty_Bagati, thank you very much for your quick reply!
I added KeywordUtil.logInfo(response.getResponseText()).
“KI_ISOELECTRIC_POINT” looks “normal” in the response both via Katalon and via CMD/command line.
report:
Thank you very much! I’ll use your solution instead.
Only one last question: There is still the issue that the code with getElementPropertyValue seemed to be working fine when I click Run Test Case or test suite in Katalon directy.
So I always have to re-check via Jenkins/command line if my code really works or if I have to improve it?
There is no way that I can enforce the same behavior for running my TC directly in Katalon and for running it via the command lie (i.e. that I see the error either in both cases or in none)?