Page 1 of 1

Passing value from one test case to another

Posted: Wed Aug 10, 2016 11:27 am
by ankit26
I want to pass the value of a variable from one test case to another test case. Can someone please help me with the same.I am using Ranorex 6 on desktop.

Re: Passing value from one test case to another

Posted: Wed Aug 10, 2016 11:44 am
by odklizec
Hi,

Please check this blog about passing data from one module to another:
http://www.ranorex.com/blog/sharing-dat ... o-another/
You can use the same principle for transferring value between test cases, using Global Parameter to which you can save a value from Test Case A and then read that Global Parameter in Test Case B. Hope this helps?

Re: Passing value from one test case to another

Posted: Thu Aug 11, 2016 1:25 pm
by ankit26
I forgot to mention that I have multiple test cases in one test case and I am not able to pass the value. When I open Global parameter and add a name but it does not have any module variables under the dropdown. I have been using global variables for passing values between modules but am not able use the same concept for passing the values between test-cases.

Re: Passing value from one test case to another

Posted: Thu Aug 11, 2016 2:15 pm
by krstcs
Actually it is exactly the same. Create a global parameter, set the value in module A in test case 1, and read the value in module B in test case 2.

The binding of global parameters happens at the TEST CASE level, not at the test suite level, so you won't see binding up in the global parameters list, but you can bind them when you go to the test case's data binding dialog.

I would highly recommend reading the user guide completely as it covers all of this in detail. http://www.ranorex.com/support/user-guide-20.html