Hi Support Team,
How do I use the outputs from different test cases as inputs for another test case?
Example:
Recording1.rxrec
Recording1.UserCode.cs
private void Init()
{
// Your recording specific initialization code goes here.
out1 = CreateObject(s1,s2);
}
public string CreateObject(string s1, string s2)
{
...........
return out1;
}
Recording2.rxrec
Recording2.UserCode.cs
public void CombineObjects(string in1, string in2)
{
......
}
TestProject2 - Test Suite
TestCase_1
Recording1
TestCase_2
Recording1
TestCase_3
Recording2
How can I do data binding so that:
in1 in TestCase_3 (Recording2) uses the output "out1" from TestCase_1(Recording1)
in2 in TestCase_3 (Recording2) uses the output "out1" from TestCase_2(Recording1)
Thanks
Using output variables from other testcases
-
- Posts: 77
- Joined: Wed Sep 26, 2012 8:15 pm
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Using output variables from other testcases
Hi,
Just create a new global or test case parameter and bind the variables from the different recordings to the parameter.
This will allow you to set the variables from the other modules which are linked via the parameters automatically.
This is also described in the following section of our UserGuide: Ranorex Test Suite, search for "parameters".
Regards,
Markus
Just create a new global or test case parameter and bind the variables from the different recordings to the parameter.
This will allow you to set the variables from the other modules which are linked via the parameters automatically.
This is also described in the following section of our UserGuide: Ranorex Test Suite, search for "parameters".
Regards,
Markus
-
- Posts: 77
- Joined: Wed Sep 26, 2012 8:15 pm
Re: Using output variables from other testcases
It only shows you how to bind the variables from different modules within the same test case, not as my situation.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Using output variables from other testcases
Hi,
If I got you correctly it should run as I described.
I also attached a sample solution where you can see how you can pass variables to recording of other test cases.
I hope this will help you solve the issue!
Regards,
Markus
If I got you correctly it should run as I described.
I also attached a sample solution where you can see how you can pass variables to recording of other test cases.
I hope this will help you solve the issue!
Regards,
Markus
You do not have the required permissions to view the files attached to this post.
-
- Posts: 77
- Joined: Wed Sep 26, 2012 8:15 pm
Re: Using output variables from other testcases
I don't think it is the same as my case.
TestProject2 - Test Suite
--> TestCase_1
--------> Recording1
--> TestCase_2
--------> Recording1
--> TestCase_3
--------> Recording2
Please see the attached solution
TestProject2 - Test Suite
--> TestCase_1
--------> Recording1
--> TestCase_2
--------> Recording1
--> TestCase_3
--------> Recording2
Please see the attached solution
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Using output variables from other testcases
Hi,
Thanks for the solution!
I changed your project a bit and now it works as you expected.
You have to bind the output variables of Recording1 to global parameters (one for each output variable) and the input variables of Recording2 to the same parameters.
For more details please take a look at the attached solution.
Regards,
Markus
Thanks for the solution!
I changed your project a bit and now it works as you expected.
You have to bind the output variables of Recording1 to global parameters (one for each output variable) and the input variables of Recording2 to the same parameters.
For more details please take a look at the attached solution.
Regards,
Markus
You do not have the required permissions to view the files attached to this post.
-
- Posts: 77
- Joined: Wed Sep 26, 2012 8:15 pm
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Using output variables from other testcases
I am glad I was able to help !
Regards,
Markus
Regards,
Markus