Method code too large In Katalon v5.4

Can you help to provide your test script? By the way, you mean Katalon Studio 5.4, right?

Hi Vinh,
Sorry about that, not sure what I was thinking. Should have been Katalon 5.3.1 & 5.4.
I will not be able to provide you with a copy of my script because it is mostly internal and would fail anyways. But I will attach a log file tomorrow as I am able to replicate this issue on a regular basis.

Hi Vinh,
I have created a skeleton project where the test script will not run due to missing variables and the like but it does result in the “Method code too large!” error. The project is too large to load here… Is there an email address I can send the file to so you can reproduce the error? Or does Katalon have a GIT helpdesk area where I could load the file for you to download?

Hi Vinh,
Any news on where I could load the file for you?

Okay I loaded the file here:
Click on KATALONV54

Click on Download

Save to local system
Open in Katalon 5.3.1 and run cases… Error does not result
Open in Katalon 5.4 and run cases… Error does result

Hi ,
This is still an issue.
Can one of the Katalon team members check into this issue?


Any updates on this issue?

This is still an issue for our team and is preventing us from moving to Katalon 5.4.

Best regards,

Hi all,

We do not touch anything into this core, so we will take a look at it and inform you soon :slight_smile:


Hi Dave,

Upon analyzing this issue, we’ve figured out your current code where this issue happens is TOO big which is not a good practice. The current solution is you need to separate your whole script into smaller functions and put one or some of them into a separate test. You can either group similar actions into a custom keyword and call it instead

That’s a general idea, we will also looking at this issue to see if we can work on it.

Hi Vinh,
I am not sure why our code is TOO big for 5.4 but not TOO big for 5.3.1?
Big thanks for looking into the issue.


I can confirm the same issue. Script of 780 lines wont work in 5.4 and 5.4.1. In 5.3.1 it runs ok and i am not geting Method code too large error.
What changed in versions? Is there a fix in next versions?

Please be patient, we are investigating it and will reply to you guys soon once we’ve got enough information.

Hi there,

Upon checking again in our latest version, the root cause is 5.4 introduce Test Listeners which will append the current size of a test case. However, we can’t adjust it accordingly and we also observe that your current test script is quite long, which is really not a good practice in the future. If we try to adjust test script’s size to be adaptive with yours, then in the future there will be someone write a longer test case than you. In this case it is not a really good solution, and also having a large test case will be very hard to maintain later.

So we’ve decided to not change it right now, and we suggest you split your current code into smaller test cases:

Thank you for info.

I have the same problem and this is not a file size error.
I have the same test case that works on my computer and yet generate an error when running it on a virtual machine.
It may be related to how temporary files are created or in the Java memory reserve.

Duplicating with

I am closing this.