Running Katalon Test Cases with Different Parameters

Running Katalon Test Cases with Different Parameters

26 February 2025 Stephan Petzl Leave a comment Katalon Issues

When working with Katalon Studio, a common requirement is to run the same test case with different parameters. This is particularly useful when integrating with continuous integration tools like Jenkins, enabling the execution of various tests without duplicating test cases. This guide will show you how to achieve this using Katalon’s features.

Understanding Profiles in Katalon

Katalon Studio allows you to define parameters within profiles. Each profile can contain the same parameters with different values, which can be selected during test suite execution. This approach negates the need to pass parameters directly from the command line, which is not supported by Katalon.

Setting Up Profiles

  1. Create a new profile in your Katalon project.
  2. Define the necessary parameters with the required values in each profile.
  3. During test suite execution, choose the appropriate profile manually or pass it via the command line using the -executionProfile option.
katalon -noSplash -runMode=console -consoleLog -noExit -projectPath="C:\MY_PATH" -retry=0 -testSuitePath="Test Suites/MY_TEST_SUITES" -executionProfile="Profile_A"

Using Global Variables

For this setup to work, ensure your test case input variables are converted into global variables. This can be done manually or through scripting:

import internal.GlobalVariable as GlobalVariable
GlobalVariable.my_variable

Overriding Profile Variables (Version 5.10+)

From Katalon version 5.10 onwards, you can override profile variables directly from the command line. If you have a default global variable, you can switch its value using the -g_ prefix:

-g_parameter=B

Enhancing Test Automation with Repeato

While Katalon offers a structured approach to parameter management, Repeato provides an alternative that simplifies test automation for mobile and web applications. As a no-code test automation tool, Repeato leverages computer vision and AI to create, run, and maintain automated tests efficiently.

Repeato supports data-driven and keyword-driven testing, allowing for flexible and comprehensive test scenarios. Moreover, its ability to save tests in text and JSON format facilitates easy version control, making it an excellent choice for teams looking to streamline their automation processes.

For more information on how Repeato can benefit your testing strategy, explore our documentation and blog.

Like this article? there’s more where that came from!