Parameterizing reusable components with Output Parameter

Output parameters are used when you need to use a particular data value generated in a reusable component in another reusable component used in the same test case. For this, first we create an output variable in a test step and store the desired data in it. Next, we create an output Parameter and map the output variable in the parameter. Finally, we will call this output parameter in component 2. 


For example, in a test case to create requisition and hire an employee, we can store the requisition number generated in the create requisition component in an output variable and map it in an output parameter. Next, we can map the same output in Hire an employee component to hire the employee for the requisition.


Let's see the process of creating an output parameter through and example. Here, we will be mapping a data value from component RC1 in an output parameter and call it in RC 2 component.


1. Here, in the last step of this component, we have stored the value in an output variable named "abcd". We have done this by opening the Edit data of Step window by clicking the three dots icon and selecting the Set Input data option. On the Edit data of step window, we opened the Output tab and added a new output variable as shown. 



2. Now, let's save this reusable component.



3. Now create the Input Parameter for the overall reusable component by clicking the dropdown and selecting Output Parameter option. 



4. in the Output Parameter tab add the parameter name and map the associated step output. Save the changes.




5. Now to map the output parameter's value in step another component of the same test case, click on three dots icon in the second component and select Set Input Data option. Here, we are mapping the output parameter in RC 2.


 

6. Click the data drive option in the window that opens. 


 


7. Select the Data Output from the option.


 


8. Map the output variable from the list. 


 


9. Save the test case. 


 


10. Your output data is mapped. 

Click here to learn more about reusable components.

 


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article