Table of contents
1.
Introduction
2.
Test Case Variables
3.
Managing Test Case Variables
4.
View and declare variables in Script Mode
5.
Calling Test Case with variables
6.
Calling Test Case in Script mode
7.
Frequently Asked Questions
7.1.
What is Katalon?
7.2.
Does Katalon use WebDriver?
7.3.
Which format is the code displayed in the Variable (Script Mode) tab?
8.
Conclusion
Last Updated: Aug 13, 2025

What are test Case variables in Katalon studio?

Author Nagendra
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

Hello Ninjas!! Welcome to another article on Katalon Studio. Today we will learn about the test case variables in Katalon studio. The Katalon platform offers testing solutions. It benefits teams of various sizes and testing maturity levels. The toolkit assists small teams in the early stages of automation. It helps to grow into large international corporations in AI/ML.

The article explains the details of creating and managing test case variables in Katalon Studio.

Without further ado, let's get started.

Test Case Variables in Katalon

Test Case Variables

The Test Case Variables allow users to pass dynamic variables data in a test case. You can construct test case variables and invoke test cases with variables. This can be done in both manual and script modes.
Test Case Variables in Katalon Studio can be used to parameterize your test case. It can be called with various inputs rather than running the test case with hard-coded values.

Let's have a look at an example of a test case with hard-coded values:

Code:

String Student_Name = 'Coding Ninjas'
Number Marks = 50
println "${Student_Name} - ${Marks}"

Managing Test Case Variables

Follow the following steps to add test Case variables:

  • Select File -> New -> Test case.
     
  • Create a new test case variable.
    • Go to your Test Case's Variables tab.
       
    • Select Add. The variable list now has a new row.
       
    • Add the values as shown in the figure:
Managing test case Image

View and declare variables in Script Mode

You can switch to the Variable (Script Mode) tab. This will display the script editor in XML.

Script Mode Image

The figure displays the Script Mode of the Test case. It is automatically created when we create a Test case.

Calling Test Case with variables

Variables are the named locations used to designate a value. You can easily use the old variables in your Test Case . This ensures the reusability of the variables.

Follow the following steps to call a test case with variables:

  • Open a test case in manual mode.
     
  • Click Add.
     
  • Select Call Test Case.
     
  • The dialogue box containing all of the project's current test cases will appear as in the figure:
Test Case browser Image
  • Select your test case.
     
  • Click OK.
calling Test Case Image

The figure shows that our created test case is automatically called in the new test case.

The above-selected test case will serve as the target of a new step called Call Test Case.

  • Click over the Input Box. The Map Input Dialog Box will appear.
     
  • Click on Insert
Map Input Image

The figure shows the Map Input Dialog Box.


The Input Dialog Box will appear.

  • Click on Ok.
Input Image

The figure shows the Input Dialog Box. It maps the input to the desired output.

  • Run Your Test Case.
     

Output:

Output Image

The figure displays Output as per the Input provided.

Calling Test Case in Script mode

Katalon uses groovy language. The Script mode ensures that you can run the test case without any manual work.

The following code calls the test case in Script mode:

Code:

WebUI.callTestCase(findTestCase('Data-driven Testing/Test Case with variables'), [('student_Name') : 'CodingNinjas', ('Marks') : 50'], FailureHandling.STOP_ON_FAILURE)

Frequently Asked Questions

What is Katalon?

Katalon is an open-source platform for automation testing software.

Does Katalon use WebDriver?

Katalon uses the Selenium WebDriver framework.

Which format is the code displayed in the Variable (Script Mode) tab?

The Variable (Script Mode) tab displays the code XML format.

Conclusion

In this article, we have extensively discussed the details of creating and managing test case variables in Katalon Studio.

We hope that the blog has helped you enhance your knowledge regarding Test Case variables in Katalon studio. If you would like to learn more about Katalon, check out the articles on Katalon, you can refer to our guided paths on the Coding Ninjas Studio platform to learn more about DSADBMSCompetitive ProgrammingPythonJavaJavaScript, etc. To practice and improve yourself in the interview, you can also check out Top 100 SQL problemsInterview experienceCoding interview questions, and the Ultimate guide path for interviews. Do upvote our blogs to help other ninjas grow. Happy Coding!!

Live masterclass