Katalon repsonse size smaller than Postman response size?

Hi,

I’m importing some Postman-calls I got from a colleague.
To ensure it was not user error I also manually re-created the call instead of using the JSON import.
Both results in Katalon are exactly the same.

While on the surface the response looks very similar, the response SIZE is different:
In Katalon I get 624 bytes, and in Postman I get 4 KB.

Could anyone shine some light on this? I’m not very experienced with API automation and this is the first time setting it up in Katalon after 3 years not touching this kind of testing.

POSTMAN response:

<!DOCTYPE html>
<html lang="nl">

<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="description" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1">


	<meta name="frontend-organization-portal/config/environment"
		content="%7B%22modulePrefix%22%3A%22frontend-organization-portal%22%2C%22environment%22%3A%22production%22%2C%22rootURL%22%3A%22%2F%22%2C%22locationType%22%3A%22history%22%2C%22yasgui%22%3A%7B%22defaultQuery%22%3A%22%7B%7BYASGUI_DEFAULT_QUERY%7D%7D%22%2C%22extraPrefixes%22%3A%22%7B%7BYASGUI_EXTRA_PREFIXES%7D%7D%22%7D%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3Afalse%2C%22_APPLICATION_TEMPLATE_WRAPPER%22%3Afalse%2C%22_DEFAULT_ASYNC_OBSERVERS%22%3Atrue%2C%22_JQUERY_INTEGRATION%22%3Afalse%2C%22_TEMPLATE_ONLY_GLIMMER_COMPONENTS%22%3Atrue%7D%2C%22APP%22%3A%7B%22analytics%22%3A%7B%22appDomain%22%3A%22organisaties.abb.lblod.info%22%2C%22plausibleScript%22%3A%22https://plausible.lblod.info/js/plausible.js%22%7D%2C%22name%22%3A%22frontend-organization-portal%22%2C%22version%22%3A%221.9.0-5%2B38c9bf6a%22%7D%2C%22appName%22%3A%22OrganisatiePortaal%22%2C%22contactEmail%22%3A%22organisaties.abb%40vlaanderen.be%22%2C%22environmentName%22%3A%22QA%22%2C%22torii%22%3A%7B%22disableRedirectInitializer%22%3Atrue%2C%22providers%22%3A%7B%22acmidm-oauth2%22%3A%7B%22apiKey%22%3A%22677af572-2e2f-4e61-ad38-036723bb314c%22%2C%22baseUrl%22%3A%22https://authenticatie-ti.vlaanderen.be/op/v1/auth%22%2C%22scope%22%3A%22openid vo profile abb_organisatieportaal%22%2C%22redirectUri%22%3A%22https://organisaties.abb.lblod.info/authorization/callback%22%2C%22logoutUrl%22%3A%22https://authenticatie-ti.vlaanderen.be/op/v1/logout%22%7D%7D%7D%2C%22showAppVersionHash%22%3Afalse%2C%22uriInfoServiceUrl%22%3A%22%2Furi-info%22%2C%22userManual%22%3A%7B%22general%22%3A%22https%3A%2F%2Fabb-vlaanderen.gitbook.io%2Fhandleiding-organisatieportaal%22%2C%22module%22%3A%7B%22administrativeUnits%22%3A%22https%3A%2F%2Fabb-vlaanderen.gitbook.io%2Fhandleiding-organisatieportaal%2Fmodules%2Fbestuurseenheden%22%2C%22people%22%3A%22https%3A%2F%2Fabb-vlaanderen.gitbook.io%2Fhandleiding-organisatieportaal%2Fmodules%2Fpersonen%22%7D%7D%2C%22exportApplicationGlobal%22%3Afalse%7D" />

	<link integrity="" rel="stylesheet" href="/assets/vendor-ff11c68854418968f5f9df0984d24f03.css">
	<link integrity="" rel="stylesheet"
		href="/assets/frontend-organization-portal-a74edbd5bdef05f256da4fd496b3869e.css">
	<link rel="icon" href="/assets/images/favicon.svg">


</head>

<body>
	<div id="ember-appuniversum-wormhole"></div>

	<script src="/assets/vendor-2194857c973b99c06b870877bd3a35c2.js"
		integrity="sha256-710v7pF+trd/XucpVQ4psm2X0qwAM8SOJsi3LMpntAA= sha512-/U7NoYs60zM6xNKNJ+jEy9n4A8plZcEHGD4o6yDeL5GV7G7QavZDDl4suFzJxziebxBrVPQ/jtZj30BBE9+kqw==">
	</script>
	<script src="/assets/chunk.532.b3925e21de9088272521.js"
		integrity="sha256-HFl++j/1nSuREe9t2YtrbBCfynBZG54iLJcnW/PiM1Q= sha512-8U90B/VGXuYOKotPRGkqfbCfe50F8zxaYk3GTaN2Cjd5K3RG0whRoz0wUcdBj353csnrye0PIMR1aSFnHyqzqQ==">
	</script>
	<script src="/assets/chunk.143.879f6640309cc473dcf7.js"
		integrity="sha256-by1vQ0wSaWTiacrpP9mFM/kQ0Ozw1+8Q1vkpj5ll1Ac= sha512-L9FR3R8rZFPYSigbu4Nan4oJiFMAX7543aSuCwmEXGtgcilSBWJcAch9o+gBN7yisMbR+Hdl34XY8plcKK1qRA==">
	</script>
	<script src="/assets/frontend-organization-portal-52f39627d08511b7c9b8e64a0d8c3a8f.js"
		integrity="sha256-ramBZNb16pP6xpCWExMvFvHjeyU9h0GxhwfkuTXu7iE= sha512-752FhL28me7q0UJaLyKJbJegAJzzJ6W4jmbGdcW5reesuXMYRBXObYLlMmlSSFSjfUchCWp+5k+CmPr725h9+A==">
	</script>

	<div id="ember-basic-dropdown-wormhole"></div>
</body>

</html>

KATALON response:


  <!DOCTYPE html>
<html lang="nl">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="frontend-organization-portal/config/environment" content="%7B%22modulePrefix%22%3A%22frontend-organization-portal%22%2C%22environment%22%3A%22production%22%2C%22rootURL%22%3A%22%2F%22%2C%22locationType%22%3A%22history%22%2C%22yasgui%22%3A%7B%22defaultQuery%22%3A%22%7B%7BYASGUI_DEFAULT_QUERY%7D%7D%22%2C%22extraPrefixes%22%3A%22%7B%7BYASGUI_EXTRA_PREFIXES%7D%7D%22%7D%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3Afalse%2C%22_APPLICATION_TEMPLATE_WRAPPER%22%3Afalse%2C%22_DEFAULT_ASYNC_OBSERVERS%22%3Atrue%2C%22_JQUERY_INTEGRATION%22%3Afalse%2C%22_TEMPLATE_ONLY_GLIMMER_COMPONENTS%22%3Atrue%7D%2C%22APP%22%3A%7B%22analytics%22%3A%7B%22appDomain%22%3A%22organisaties.abb.lblod.info%22%2C%22plausibleScript%22%3A%22https://plausible.lblod.info/js/plausible.js%22%7D%2C%22name%22%3A%22frontend-organization-portal%22%2C%22version%22%3A%221.9.0-5%2B38c9bf6a%22%7D%2C%22appName%22%3A%22OrganisatiePortaal%22%2C%22contactEmail%22%3A%22organisaties.abb%40vlaanderen.be%22%2C%22environmentName%22%3A%22QA%22%2C%22torii%22%3A%7B%22disableRedirectInitializer%22%3Atrue%2C%22providers%22%3A%7B%22acmidm-oauth2%22%3A%7B%22apiKey%22%3A%22677af572-2e2f-4e61-ad38-036723bb314c%22%2C%22baseUrl%22%3A%22https://authenticatie-ti.vlaanderen.be/op/v1/auth%22%2C%22scope%22%3A%22openid vo profile abb_organisatieportaal%22%2C%22redirectUri%22%3A%22https://organisaties.abb.lblod.info/authorization/callback%22%2C%22logoutUrl%22%3A%22https://authenticatie-ti.vlaanderen.be/op/v1/logout%22%7D%7D%7D%2C%22showAppVersionHash%22%3Afalse%2C%22uriInfoServiceUrl%22%3A%22%2Furi-info%22%2C%22userManual%22%3A%7B%22general%22%3A%22https%3A%2F%2Fabb-vlaanderen.gitbook.io%2Fhandleiding-organisatieportaal%22%2C%22module%22%3A%7B%22administrativeUnits%22%3A%22https%3A%2F%2Fabb-vlaanderen.gitbook.io%2Fhandleiding-organisatieportaal%2Fmodules%2Fbestuurseenheden%22%2C%22people%22%3A%22https%3A%2F%2Fabb-vlaanderen.gitbook.io%2Fhandleiding-organisatieportaal%2Fmodules%2Fpersonen%22%7D%7D%2C%22exportApplicationGlobal%22%3Afalse%7D" />
    <link integrity="" rel="stylesheet" href="/assets/vendor-ff11c68854418968f5f9df0984d24f03.css">
    <link integrity="" rel="stylesheet" href="/assets/frontend-organization-portal-a74edbd5bdef05f256da4fd496b3869e.css">
    <link rel="icon" href="/assets/images/favicon.svg">
  </head>
  <body>
    <div id="ember-appuniversum-wormhole">
    </div>
    <script src="/assets/vendor-2194857c973b99c06b870877bd3a35c2.js" integrity="sha256-710v7pF+trd/XucpVQ4psm2X0qwAM8SOJsi3LMpntAA= sha512-/U7NoYs60zM6xNKNJ+jEy9n4A8plZcEHGD4o6yDeL5GV7G7QavZDDl4suFzJxziebxBrVPQ/jtZj30BBE9+kqw==" >
    </script>
    <script src="/assets/chunk.532.b3925e21de9088272521.js" integrity="sha256-HFl++j/1nSuREe9t2YtrbBCfynBZG54iLJcnW/PiM1Q= sha512-8U90B/VGXuYOKotPRGkqfbCfe50F8zxaYk3GTaN2Cjd5K3RG0whRoz0wUcdBj353csnrye0PIMR1aSFnHyqzqQ==" >
    </script>
    <script src="/assets/chunk.143.879f6640309cc473dcf7.js" integrity="sha256-by1vQ0wSaWTiacrpP9mFM/kQ0Ozw1+8Q1vkpj5ll1Ac= sha512-L9FR3R8rZFPYSigbu4Nan4oJiFMAX7543aSuCwmEXGtgcilSBWJcAch9o+gBN7yisMbR+Hdl34XY8plcKK1qRA==" >
    </script>
    <script src="/assets/frontend-organization-portal-52f39627d08511b7c9b8e64a0d8c3a8f.js" integrity="sha256-ramBZNb16pP6xpCWExMvFvHjeyU9h0GxhwfkuTXu7iE= sha512-752FhL28me7q0UJaLyKJbJegAJzzJ6W4jmbGdcW5reesuXMYRBXObYLlMmlSSFSjfUchCWp+5k+CmPr725h9+A==" >
    </script>
    <div id="ember-basic-dropdown-wormhole">
    </div>
  </body>
</html>

> Blockquote

I just guess, Postman and Katalon Studio behaves differently when the response has a header:

Content-Encoding: gzip

The size of raw gzipped response will be far smaller (624 bytes) than the original text message (4KB).

KS might be showing the size of raw bytes.

Postman might be showing the unzipped text size.

I just guess.

If you search this forum, you would find that KS has some other problems for Web Service Testing. For example,

Why not you use the same tools as your colleague?

Thanks for your insight. I’ll check the forum some more.

Because my colleagues have to much work and we have a need to replace some of the repetitive tasks with automation.

You do not need to change the tool, do you?

Postman says that it can be automated.

You want to write automated test with Postman in JavaScript.

1 Like

I had to look it up, I was not aware Postman could be used for automation as well.

Thanks again for the help!

1 Like

I was able to solve this issue:
By correctly setting the content-type and accept-encoding http headers.

My response size is now displayed correctly, but Katalon still has issues sending and handling the larger response size and will freeze and throw errors even after messing with the timeout and response limit size.

However after not responding for a few minutes and ‘stopping the script’ I can see the 42MB json has loaded in the Response window.

I will update when I can …

You can allocate larger memory for Katalon Studio. See how to

This may help.

I seem to remember, Katalon Studio is not robust enough at processing large size of XML/JSON. It naively tries to keep all data in memory. So when it happened to pull a massive data, it just hangs.

What did you do? Did you stop using Content-Encoding: gzip?

I am just curious.

Yes it almost feels like a memory leak, when I execute the call it goes up to around 97% RAM usage.

I had already allocated more memory in the katalonc.ini file and after increasing it even more it still hangs untill the Java heap space error. Strangely the response body shows up correctly.

As I said I imported the call from postman, and used all the headers my colleague had set.
The headers where not optimized for Katalon so I removed quite a few as a test.
I also tried without the accept encoding - gzip header. But that would result in the same issues only the response would not be unpacked (response size would be less than 1MB).

In the end all I really needed was Content-type, Connection (keep alive), authorization, and accept encoding.

I would not be surprised if you could find a serious bug in Katalon Studio here.

@Jass
@duyluong

1 Like

@kazurayam - Would it be wise to create a ticket for this? Or should I wait for a reply.

You should create a ticket.


I am afraid you might encounter more problems in API testing in Katalon Studio, and waste your time. Nothing stops you to contribute, but I suppose it would be better for you to choose Postman.

I am going to chase this a little bit longer since my team has low tech capabilities (hence why we chose Katalon) and I am tasked with creating a sustainable framework the team can learn and work in.

Since I myself barely know javascript, Postman is not a viable solution at the moment. If Katalon has to much issues we will avoid API automation at the moment I’m afraid.

@kazurayam - Thank you again for your insight!

I have ever encountered a few problems in the API Testing feature of Katalon Studio. I guess, API Testing support of KS is not well designed, not well tested. I don’t trust it.

Learning JavaScript with Postman might be enjoyable for you.

Anyway, Good-luck.

1 Like