I have 2 different user code modules, name Module1.rxrec and Module2.rxrec
In Module1.rxrec, one of the steps using user code module named Module1.UserCode.cs as below:
public string Function_1(string input1, string input2)
{
return output1;
}
In Module2.rxrec, there is also one of the steps using user code module named Module2.UserCode.cs as below:
public void Function_2(string input3, string input4)
{
.....
}
but input3 is the output from the function called Function_1 in Module1.rxrec
If I setup a testcase that includes these 2 recording modules, and I want to use the output1 data from the first module and use it as input in the second recording module, is this possible?
How to use the output of a module as input of the next one
-
- 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: How to use the output of a module as input of the next one
Hi,
Yes, this is possible!
I would bind the output of the first module and the input of the second module to a global parameter of the test suite. This will ensure that the input3 variable will be set to the value of the output variable.
Don't forget to use a Module Variable for the input and output parameter, otherwise you cannot bind them to the global parameter in the test suite.
For more details see the attached sample solution.
Regards,
Markus
Yes, this is possible!
I would bind the output of the first module and the input of the second module to a global parameter of the test suite. This will ensure that the input3 variable will be set to the value of the output variable.
Don't forget to use a Module Variable for the input and output parameter, otherwise you cannot bind them to the global parameter in the test suite.
For more details see the attached sample 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
Re: How to use the output of a module as input of the next one
Hi Markus,
This sample is awesome and it helped me a lot but. How can i do the same thing when the parameter to use is a string[]? like output1 = {"label1","label2"}
thanks
This sample is awesome and it helped me a lot but. How can i do the same thing when the parameter to use is a string[]? like output1 = {"label1","label2"}
thanks
Support Team wrote:Hi,
Yes, this is possible!
I would bind the output of the first module and the input of the second module to a global parameter of the test suite. This will ensure that the input3 variable will be set to the value of the output variable.
Don't forget to use a Module Variable for the input and output parameter, otherwise you cannot bind them to the global parameter in the test suite.
For more details see the attached sample solution.
Regards,
Markus
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to use the output of a module as input of the next one
Hi,
Thanks !
You have to convert the String Array to a String before you can bind it to a variable(is always a String), here is a link to a page where it is described how this could work: String Array to String.
I hope this will help you solve the problem.
Regards,
Markus
Thanks !
You have to convert the String Array to a String before you can bind it to a variable(is always a String), here is a link to a page where it is described how this could work: String Array to String.
I hope this will help you solve the problem.
Regards,
Markus