Forum Discussion

abalas4's avatar
abalas4
New Contributor
8 years ago

clear property values for all rows in Data Sink using groovy

I  tried the following as suggested in one of the forums but this clears the data only for the first row. How do I clear the datasink for all the rows? 

 

String[] props = new String[dataSink.getPropertyCount()]
props = dataSink.getPropertyNames();
log.info("Property size:" + props.size())
for (int i=0;i<props.size();i++)
{
dataSink.setPropertyValue(props[i],"")
}

 

1 Reply

  •  Hi,

     

    Here is the script to clear dataSink property value,

    step = testRunner.testCase.getTestStepByName("DataSink")

    step.setPropertyValue("prop1", "")

     

    Thanks