So, in the first test Case, I call the second test case:
WebUI.callTestCase ( findTestCase(‘Repertoire/Comm_Case’), [site : site_web, num : tel], FailureHandling.STOP_ON_FAILURE)
site and num are Global Variables that I created and initiated with " ",
and site_web and tel are the two variables that i want to pass to the second test case
Please tell me how should I initiate my Global Variable, and how should I call and use the variables site_web and tel in the second test case.
Problem solved.
I should put site and num between quotes, and they should be local variables in the called test case, as String, init=" "
There is no need to Global Variable.
WebUI.callTestCase ( findTestCase(‘Repertoire/Comm_Case’), [‘site’ : site_web, ‘num’ : tel], FailureHandling.STOP_ON_FAILURE)
Problem solved.
I should put site and num between quotes, and they should be local variables in the called test case, as String, init=" "
There is no need to Global Variable.
WebUI.callTestCase ( findTestCase(‘Repertoire/Comm_Case’), [‘site’ : site_web, ‘num’ : tel], FailureHandling.STOP_ON_FAILURE)
I have same problem but question is how to use ‘site’ and ‘num’ in Comm_Case TestCase
you are use those passed variables somewhere in Comm_Case ?
if yes then how ?
I have issue on passing variable that has a random value to another test case.
Solution: I created a Global Variable with empty string then I set that Global Variable on my testCase_1 with a random value. I can now call that Global Variable to my testCase_2 without calling testCase_1. But you must execute testCase_1 first on your test suite.
I have a specific test where I need to check if the ‘Amount’ values of a given customer is same in 2 different web applications. My approach is as follows -
Connect to App1 and exact few customer IDs and their corresponding ‘Amount’ field values. Save it somewhere in the form of a table / excel file or concatenate the two fields and store as one variable.
Connect to App2 and exact customer IDs and corresponding amounts of the same customers and save it in the same format as above.
Check if the amount values of App1 are matching with that of App2 for every customer.
I read through many blogs but did not come across any feature to compare two files/values which contains values generated during test execution.
Could someone advise me on this please, or if there are other workarounds that I could try.
Hey Can you explain this in detail with code example if you have available?
I am trying similar but not having any luck.
So I am trying to do following
There is checkout process and I have created test case for each page lik
Test case A (has 1 variable - var1)
Test case B (has 2 variable - var2, var3, var4)
I am trying to create main Test case and call test Case A and test Case B but I want to pass data into variable from main test case and same for other test case too.
@Mihir_Kadiya
I was having trouble understanding the syntax, but I think this will make more sense:
I have test ParentTest that will call test ChildTest. ParentTest will pass down value ValueToBePassed to ChildTest, who will accept it as VariableInChildTest.
I tried it out a couple different ways until it clicked. The ValueToBePassed can be a string or its own variable, like I did here, but the parent test wants VariableInChildTest to be presented as a string - don’t forget to put it in single quotes inside the callTestCase function.