# Call Test Case and Variable

**URL:** <https://forum.katalon.com/t/call-test-case-and-variable/20554>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [March 5, 2019, 10:11pm UTC](https://forum.katalon.com/t/call-test-case-and-variable/20554 "2019-03-05T22:11:53Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Steven\_Taylor](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@Steven\_Taylor](https://forum.katalon.com/u/Steven_Taylor)\
**Post date:** [April 23, 2019, 6:19pm UTC](https://forum.katalon.com/t/call-test-case-and-variable/20554/5 "2019-04-23T18:19:08Z")

</div>

My scenario may be a little different, I’m not reading the value in from an excel file, but I’m sure the basic concept is the same.

So in Test Case A I create a variable called myVariable and give it a default value (optional I suppose). The only thing this Test Case does is output the value of that variable. In the examples below you can see where I defined the value and the output when I run the test case.

 ![image](https://europe1.discourse-cdn.com/katalon/original/2X/b/b715c41ac468c6ce91143179071da8a5a87340d4.png)

 ![image](https://europe1.discourse-cdn.com/katalon/original/2X/3/3d814f9afbf250602f89f348e56a9d5468475354.png)

In Test Case B I’m calling Test Case A and setting the value of myVariable. Then when I run this test case you’ll see that Test Case A is outputting the value set on Test Case B, not the default value set in Test Case A.

 ![image](https://europe1.discourse-cdn.com/katalon/original/2X/a/a637e120d10997dab1c9c622b51b88e5b82af25f.png)

 ![image](https://europe1.discourse-cdn.com/katalon/original/2X/5/57c752fcc2016360f9002019dbba2eb949a801e8.png)

Hope that helps; I’m actually about to start messing around with reading values in from Excel so if I come across anything I think might help you I’ll pass it along.

Later,  
Steve

---

_[View the full topic](https://forum.katalon.com/t/call-test-case-and-variable/20554)._
