Utilizing an array declared or data stored in a variable from test case 1 to be used in test case 2 is possible?

Utilizing an array declared or data stored in a variable from test case 1 to be used in test case 2 is possible?
For example, my test case is lengthy due to logic and hence if i try to keep them all in one test case and run katalon shows error as ‘Methodtoolarge’. So, i’m splitting them to multiple test cases. (I have to split into 3 test cases - it’s just like a continuation of the flow from test case 1 till test case 3)
Now, having said that i’ve split into multiple test case and if i try to use the arrays or data stored in a variable(some got stored during run time or declared initially) from test case 1 is unable to use in test case 2 or test case 3.
From test case 1, i’ve added ‘call test case’ method for both test case 2 and test case 3
Please help to resolve this

If you create a new test case (let’s call it “supervisor”) you can call each test case from supervisor and return values from each test case using WebUI.callTestCase()

I’d like to give you a link to the docs but that method is missing. (@vu.tran)

It’s under common…

2 Likes

Hi @mithun.chakravarthi8

I use WebUI.callTestCase() & Global Variables when breaking out long test cases (250+steps). You can pass a GlobalVariable to any test case in the same test suite.

Note: Best practice says we should never have such long test cases. But sometimes you have no choice but to break out these types of cases.

Cheers Dave

Thanks @Russ_Thomas i’ll refer them and use

1 Like

Thanks @Dave_Evers i’ll refer them and use

1 Like

Thanks Russ, we are on this. cc @xuan.tran for visibility.

1 Like

@vu.tran @xuan.tran

It would be good, too, if the example code used the returned result. There are three calls to callTextCase() in the example, but none of them use a return value.

image

1 Like