Output Parameters Reset before each iteration

Hi all,

I am executing my script to extract information from the application and storing in CSV file. I have few questions related to Output parameter.
1- Is Output parameter value reset to 0 or null before each iteration?
2- If not, is there a way to reset value before each run so the parameters not retain the values from previous iteration.


Hi @pratima.sharma,
Output parameters are mainly used in sub-tests.
To give your parameter value from a sub-test to the main test, you use an output parameter in the sub-test and link it to an input parameter in the main test.
If this is not your case, you can use input parameters.

Suppose you are executing the same test several times in a job or executing the same test several times. In that case, the parameter value should change back to the default value or use the value given by a CSV file in a data-driven test.

I don’t know your case specifically, but if your parameter is used more than once in the same test and you need to change the value to nothing, you can use the ‘Set value to a parameter’ action without any value.

Thanks @ran.ferdinaro for a prompt reply. In my scenario I am using Output parameters to extract information in CS file. Here are sample steps:

  • Get text from Country Textbox
  • Update the value of cell “{RowNumber}” , “1” to "{Country}- This will update the CSV file column 1, Row 1 based on variable row#.

If I have 100 iteration for the above steps. Is there a need to reset value before each iteration in TestProject?
The issue I am having is as follows:
If Country field is not available in the next iteration it still shows the previous Country on the output. That means the Country Output value stays in the memory until a new value pass to the parameter from the system.

Thanks again for your help.

@pratima.sharma, In your case there is no need to reset your parameter.

  1. Create a new parameter.
  2. Use the get text action.
  3. If your text from the get text action equals to the new parameter, skip the next steps.
  4. Add a new step at the end which will give the new parameter the value of the parameter (from the get text action), and validate that it is not empty.
1 Like