Setup Test to pass parameters between test cases
In SilkCentral, Execution Planning, and in any Execution Plan, Test Execution Setup, we can use Setup Test to setup the before condition of running a SilkTest test case.
We have the below in my execution plan.
This is my Setup test case. We pass in the sUrl2 from SilkCentral into SilkTest and assign sUrl2 to sURL. In the inc file, we have defined String sURL = "".
We have the below test case that need to use the sURL parameter.
We create a Parameters sURL in SilkCentral, and we pass in a value as "http://test.com". We can see that the sUrl is http://test.com in the setUp test case. But it still fails for the login() test case, and the sUrl is blank. We expect that the sUrl will populate to the http://test.com globally at setUp() and any subsequent test cases can use this parameter. Is this a correct expectation? Anyway we can populate the variable to use globally in setUp()?
Thank you for any suggestion!
This value is not kept between two test executions.
Is it possible to pass the url as parameter like you do it in the "setUp" testcase?
Another workaround would be to store the value from the setUp testcase into a file and instead of using sUrl directly in the other testcases create a function that reads the value from the file.