Api tests failing in versions higher than katalon 6.3.3

Hi,

My API test is working as expected in katalon version 6.3.3 and lower versions but it is throwing different response in higher versions. By comparing the har files, I realised that the headers in response are different, dont know the reason.

Here is the response headers from both the version:

From 6.3.3:

“response” : {
“status” : 200,
“statusText” : “”,
“httpVersion” : “”,
“cookies” : [ ],
“headers” : [ {
“name” : null,
“value” : “HTTP/1.1 200 OK”
}, {
“name” : “X-ruxit-JS-Agent”,
“value” : “true”
}, {
“name” : “X-OneAgent-JS-Injection”,
“value” : “true”
}, {
“name” : “Server”,
“value” : “Microsoft-IIS/10.0”
}, {
“name” : “Access-Control-Allow-Origin”,
“value” : “"
}, {
“name” : “Last-Modified”,
“value” : “Tue, 07 Apr 2020 00:20:09 GMT”
}, {
“name” : “Pragma”,
“value” : “no-cache”
}, {
“name” : “Date”,
“value” : “Tue, 07 Apr 2020 10:44:27 GMT”
}, {
“name” : “Accept-Ranges”,
“value” : “bytes”
}, {
“name” : “Cache-Control”,
“value” : “no-cache, no-store, max-age=0, must-revalidate”
}, {
“name” : “ETag”,
“value” : ""
:0:""
}, {
“name” : “Set-Cookie”,
“value” : “*****************; path=/;Secure”
}, {
“name” : “Set-Cookie”,
“value” : "dtCookie=
**; Path=/; Domain=; Secure”
}, {
“name” : “Expires”,
“value” : “-1”
}, {
“name” : “Content-Length”,
“value” : “1471”
}, {
“name” : “X-Powered-By”,
“value” : “ASP.NET
}, {
“name” : “Content-Type”,
“value” : “text/html”
} ],

and from 7.0.4:

“response” : {
“status” : 200,
“statusText” : “”,
“httpVersion” : “”,
“cookies” : [ ],
“headers” : [ {
“name” : “Access-Control-Expose-Headers”,
“value” : “Content-Type, Authentication, "
}, {
“name” : “Cache-Control”,
“value” : “private”
}, {
“name” : “Server”,
“value” : “Microsoft-IIS/10.0”
}, {
“name” : “X-AspNet-Version”,
“value” : “4.0.30319”
}, {
“name” : “Set-Cookie”,
“value” : "
************************; path=/;Secure”
}, {
“name” : “#status#”,
“value” : “HTTP/1.1 200 OK”
}, {
“name” : “Content-Length”,
“value” : “2257”
}, {
“name” : “Date”,
“value” : “Tue, 07 Apr 2020 10:52:24 GMT”
}, {
“name” : “Content-Type”,
“value” : “text/html; charset=utf-8”
}, {
“name” : “X-AspNetMvc-Version”,
“value” : “5.2”
}, {
“name” : “X-Powered-By”,
“value” : “ASP.NET
} ],

The request url is same in both the cases. The response content is different in 7.0.4.

Is there any way to fix this error?

Can you share the whole HAR files generated by both versions?

Please check your inbox.

@huynguyen Did you check this?

Hi @libra.soumya17,
Sorry for getting back to you this late. As explained earlier in our private messages, your issue arose in newer versions because Katalon has to encode special characters in the URL, due to the strict enforcement of the new internal library we use. This means, if you have already encoded special characters in your URL, they will be encoded again, causing your query parameters to be incorrectly decoded in the server side. Unfortunately, we cannot find a workaround for this. Therefore, is it feasible if you change your URL to the unencoded form, which means, any special character will remain as is without being properly escaped? Can you try that and tell us the result?

Hi @huynguyen,

Ill try with unencoded form and will let you know.
Also this auto encoding was enabled after 7.0.5 version, but it is failing in 7.0.4 version also. I had sent you the logs from that version as well.
I dont think that is because of encoding url, can you check that as well?

Thanks

Hi @huynguyen
I tried using the url with unencoded form, still not getting the expected results.
Any other solutions?
Also as I said it is not working for version 7.0,4 also when the auto encoding of the url was not enabled.

It worked by changing the url to unencoded form and by checking “Follow redirects” checkbox.

2 Likes