How to Efficiently Share Test Data Across Multiple Test Cases in Katalon Studio?

Hi everyone :waving_hand:,

I’m currently building a fairly large-scale test suite in Katalon Studio and I’m looking for the best practices to share and manage test data across multiple test cases efficiently.

Specifically, I’m wondering:

What’s the recommended way to pass dynamic test data between different test cases without hardcoding or relying heavily on global variables?

Is there a clean way to use Test Data files or Data Files binding for multiple test cases within a single Test Suite Collection?

Are there any working examples or patterns that scale well with TestOps integration or CI/CD pipelines?

I’d appreciate if anyone could share some real-world examples or approaches that helped keep things organized, maintainable, and reusable.

Thanks in advance for your help!
— jhonnmick

1 Like

Q1. Why do you want to avoid Global Variables? Please describe the reason.

Q2. Do your Test Case/TC1 and TC2 read-only the data externally given to the project? Or, does your TC1 dynamically update the data and TC2 wants to refer to the updates?

Q3. Katalon offers a feature named “Data-driven testing” as described at Data-driven testing with Katalon Studio | Katalon Docs. Why don’t you use it? Anything unsatisfactory for you? Please describe what you find insufficent.

1 Like

If you are looking for best practices and recommendations. I would suggest to use all the differents parametrization features.

In short words, I ofter use this approach:

  • For variables that would be used in a lot of test cases: I use Global Variables grouped by different execution profiles depending on the environment / scenarios i want to test.
  • For variables that will only be used inside a Test cases or for those tests scenarios when a mayor (main) test cases calls other test cases (childs) inside: I use Test Case Variables and I share the information from the mayor test case through the childs test cases using the test case parametrization feature.
  • If I have to deal with some kind of loop with different information required, such as Data-Driven tests scenarios: I use Test Cases variables and a Data File, using the Data Binding feature at a Test case or test Suite level, depending on what i want to achieve.

So, as you can see, It depends on what you aim to achieve I guess. If you share more information about you test cases maybe we can give you more recommendations.

Bests,

1 Like