Forum Discussion

Sachin_Sawe's avatar
Sachin_Sawe
Contributor
16 years ago

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

1 Reply

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    hmm.. not sure exactly.. I'll try to reproduce and will get back to you..

    regards!

    /Ole
    eviware.com