How to use 'Set Variable value' at project suite, in another test
I am trying to use a Vendor ID captured from Test-1 using 'Set variable value', in Test-2.
Variable is declared at Project Suite level and The value is successfully captured in Test-1. I have used the same variable at another step in Test-1 and it is working fine.
This is how the data was captured at Test-1:
Operation : VendorID [ProjectSuite]
This is how I am trying to display the data at Test-2:
Operation : Keys
Value : ProjectSuite.Variables.VendorID
But the operation is failing but the value is not getting passed. Kindly advise if I am missing something.
Solved! Go to Solution.
I just tested this out. You need to run both tests in the same execution plan, with Test1 first followed by Test2.
If you run the first test by itself, followed by the second test by itself, the variable value is not persistent. It will only be set for the duration of the execution.
Senior SQA Automation Engineer