reuse windows session ID over multiple test cases

Hello all,

I have a test suite collection which starts with a test suite that opens a windows app, and finishes with a test suite that closes that app, but it’s not able to find the app at the end, it’s like it’s trying to open another session but no session ID is identified. Can anyone help me to know how to get the session ID from the first test suite, to be used in the last one?

1 Like

Hi there,

Thank you very much for your topic. Please note that it may take a little while before a member of our community or from Katalon team responds to you.


I understand that you want to reuse a windows session ID in multiple Test Suites in a Test Suite Collection.

You chose a wrong path.

Two Test Suites in a TestSuiteCollection share nothing on memory. They can share only files on disk. TestSuiteA and TestSuiteB can not share anything on memory (e.g, session ID). So you should stop using Test Suite Collection. You should go for other ways of modularization.

Way 1: Test Cases in a Test Suite can share GlobalVariables

Let me assume a Test Suite includes 2 test cases, TestCase1 and TestCase2. So the TestCase1 can create a session ID and save it into a GlobalVariable.sessionID; then the TestCase2 can refer to the GlobalVariable.sessionID.

Way 2: Pass parameters via callTestCase() keyword

The callTestCase(calleeTestCase, params) keyword is more light-weight approach to share variable values. Your parent TestCaseC can call other Test Cases, TestCaseA and TestCaseB, while passing any value to the callees A and B. And a callee A can return any value to the caller TestCaseC.

1 Like