Forum Discussion

kamahade's avatar
kamahade
Regular Contributor
14 years ago

What teststep one should use ?

Hello Support team,

I have a soap request and I would like to store that teststep result to some data storage and use it later.

Which teststep I should follow ? DATASINK or Store in a file .. HOW ?

For example

1) Trigger a create job - which results in job id. - I want to store this job_id.. how I can achieve this ?
Loop this for 10 times, get 10 such job_id

wait for a while and then loop those 10 job id's to get theri status via another SOAP call.
  • Hi,

    In soapUI looping is possible only through a DataSource. So in this case I would recommend using
    1. DataSource of type 'Grid' or 'Groovy', the second would make looping more flexible
    2. Actual Request that "Trigger a create job - which results in job id."
    3. DataSink test step, also possible to use type 'Groovy'
    4. DataLoop which would use as data source 1. and as target step 2.

    Actual values would be transferred between steps using property expansions.

    For more info on data sources check http://www.soapui.org/Data-Driven-Testi ... tests.html, and for property handling check http://www.soapui.org/Scripting-Propert ... rties.html.

    Hope this helps you.

    Regards,
    Dragica
    /SmartBear Sweden
  • RJanecek's avatar
    RJanecek
    Regular Contributor
    what you mean with later ? if it is later in the same testSuite you can use groovyScript:
    context.setProperty("property", value)
    context.getProperty("property")