Using an ADG generated value in multiple test cases

If you need to use values generated by ADG for one test case as inputs in other test cases, you can store the values in a global variable and then map them to the other test cases.


Let's see this process


Here, we have taken a test case named ADG for Lead Generation in the following flow.


In this test case, we are creating a new lead on a demo CRM application. To fill random values like email ID, phone number, etc., in the lead generation form, we use ADG. 


Now, let's look at the steps to use and see how we can create and store any of these randomly generated value in a global variable and use them in another test case.

Scroll down to a test step where ADG has been used and you want to map a particular value from it. For example, here we have gone to the test step where email id value is mapped from ADG. 

First, we will store this value in an output variable. To do this, click the three dots icon on the step and select Set Input data option.


Click the output tab at the top.


Create an output variable to store the email ID generated in the step. For example, we have created a variable named Email ID from ADG as shown below. Once done, click the close icon to exit from the page.


Now, we will use the SetGlobalVariableValue keyword in the next step. This keyword takes an input value and a global variable name as input. It will take the input value and store it in the global variable. We will map the output variable containing the email ID from the previous step and map it in this step. First, let's add a new step, search the SetGlobalVariableValue keyword, and click on the search result to add it in the new step.



Now, to provide input values in this step, click the three dots icon and select Set input data option. 



Now, in the VariableName field, we have adde the global variable name as, Autogenerated Email ID. Next, to start mapping the output variable from previous step, click the data drive icon in the VariableValue row.


In the next window, click the Advanced Options tabs.



Click on the output variable from the previous step to map in the step as shown below,


Now, your value of email ID generated from the ADG will be stored in the new Global variable. You can use this value in other test cases by mapping this global variable in other test cases.


You're at the end of the article.


 Read an Overview of Auto Data Generation by clicking Here


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