Sachin_Sawe
16 years agoContributor
Example on DataSink
Can someone give an example of how to write data to a DataSink in a loop?
What I want to do is this:
I have an array say : myArray
I iterate through this array and write each row to a datasink (excel or file)
I have been able to write to both file and excel but it just writes one record and does not iterate in a loop
in my loop I do:
loop
{
targetStep.setPropertyValue( "property1" , value1 )
targetStep.setPropertyValue( "property2" , value2 )
.
.
targetStep.run( testRunner, context )
}
However this writes only one row to the file ?
thanks,
Sachin
What I want to do is this:
I have an array say : myArray
I iterate through this array and write each row to a datasink (excel or file)
I have been able to write to both file and excel but it just writes one record and does not iterate in a loop
in my loop I do:
loop
{
targetStep.setPropertyValue( "property1" , value1 )
targetStep.setPropertyValue( "property2" , value2 )
.
.
targetStep.run( testRunner, context )
}
However this writes only one row to the file ?
thanks,
Sachin