Create a Test Case


This is a companion discussion topic for the original entry at https://docs.katalon.com/katalium-framework/docs/katalium-framework-create-test-case.html

Is there by any chance the possibility to integrate tests from another test case into another one?
I.e.: I’m having a homepage, to get into this homepage I’ve made a LoginTest suite which currently has a test that successfully logs me inside the application. I would like to recall this test into the HomeTest.java class in order not to recall single actions used in the LoginPage.java class.

I couldn’t find a reference to that kind of possibility from the documentation yet, was just wondering if there was some lock inside the compiled classes.

Hi @Layzer

You can call a test case inside another test case in Katalon.

Sorry, probably I didn’t get it. That’s Katalon, correct?
Because I’m referring to Katalium currently!

Sorry @Layzer, my mistake. !

No problem @ThanhTo, any news though on the above question? :slight_smile:

@Layzer That’s exactly how page class works, to serve test classes by provide them its implementations. If your HomeTest want to use public method from LoginPage ie driver.fillEmail or driver.fillPassword, don’t hesitate to instantiate LoginPage then use its public method…

Hi Fariz, the problem is, whenever I istantiate another class, it seems to return me a NPE on the driver.
I’m kind of new to development, so it might be my spaghetti code doing something I’m not getting properly, but anytime I try to refer to a class from an external class, I’m getting this NPE on the Driver.