cerberustesting / cerberus-core

The Open Source Test Automation Platform.
https://cerberus-testing.com
GNU General Public License v3.0
329 stars 100 forks source link

[BUG] Cannot save test : ERROR - Request Entity Too Large #2508

Closed glassalle59 closed 4 months ago

glassalle59 commented 12 months ago

Cerberus4.17-SNAPSHOT-1756 Build 20231015-163303

Hello

When I save my test/ scenario, I have an error : ERROR - Request Entity Too Large

image

It seems that because I have many action "upload File to Robot" with a BIG content (Conversion from PDF to base64) in my scenario. Indeed, I need to upload 50 PDF on my test.

You can reproduce by adding one more time the last step on the scenario here : https://lmc.cerberus-testing.com/TestCaseScript.jsp?test=ECONTRAT%20-%20Sc%C3%A9narios&testcase=0004A&step=13&tabactive=tabSteps#

Is it possible to correct the error and allow me to upload many file in the same scenario ?

vertigo17 commented 12 months ago

I beleive request is too big as it include all the files to upload. Maybe it can be fixed by increasing max size on application server side if possible. best will be to the manage files outside test case définition. If files are images you can already use it with .base64 suffix. for the other files we will have to create the screen and object.

glassalle59 commented 12 months ago

all files I want to upload are PDF. How can I manage these types of files outside test case ?

vertigo17 commented 12 months ago

You can't yet. Do you have any way to split your actions/controls on different testcases or reduce file sizes.

glassalle59 commented 12 months ago

I resolve this issue by spliting the base64 value into many variables then concatenate the full value into a final variable with groovy

vertigo17 commented 12 months ago

Good but Looks very dirty ;-(.

vertigo17 commented 10 months ago

The error is coming from nginx http server. As a workaround the following parameter can be changed (it default to 1M)

client_max_body_size 5M;

inside config file

vi /etc/nginx/nginx.conf

; Target to create data file object is still relevant though

vertigo17 commented 4 months ago

fixed by https://github.com/cerberustesting/cerberus-core/commit/f42d848f5e857f305c911daa850be3781ac29efa you can now use datalib FILE type and %datalib.DATALIBNAME.base64% variable inside testcase.