How to create reusable Test Cases

By using the CallTestCase Keyword, you can implement another Test Case into the current Test Case. But is there any possiblity to change the Values of the called Test Case?

Example:

Test Case
→ Open www.google.de
→ Click Search Bar
→ Type in “Katalon”
→ Search

I want to call this Test Case but I only want to change f.e. one Value
Called Test Case / Reusable
→ Open www.google.de
→ Click Search Bar
→ Type in “Testing” //Change
→ Search

I dont want to copy the whole Test Case and change the Values, I really want to create Parameters and change the Value via Parameters after calling the Test Case.

Thank you!

With the “callTestCase” statement, you could set it up to pass in the various Values as parameters. You can even pass in a List or an Anonymous set as parameters.

Another way is to read in the Values from an outside source, such as Excel, but you would have to set up which “resource” you want to use with your TestCase. Maybe by using the idea below…

You can set up different TestSuites with Global Variables of your various Values and then call a specific TestSuite to run your TestCases.

The method you use depends how you have your TC set up. Seriously, this forum has lots of ideas that others have previously used. Just look around.

Edit: Just a note that if you use Global Variables, you do not need to pass them into your callTestCase as parameters. Instead, at the top of your callTestCase, have the import statement:

import internal.GlobalVariable as GlobalVariable

You can also have a List as a Global Variable.