Forum Discussion

feflicker's avatar
feflicker
New Contributor
16 years ago

Data Driven SOAP Request Test

I was able to add properties, load them from an external file, transfer the properties, and run the test in an automated fashion. I am using the free version.

What I want to do is have the test "loop" through multiple data sets. Is this possible?

I already understand you can do this with the pro version, where you use the datasource and datasourceloop.

Obviously I have some ideas where I can write additional code to change my properties file, execute, rename results, run again, etc as a workaround, but I was hoping this was possible without extra effort outside soapUI. Thanks!
  • M_McDonald's avatar
    M_McDonald
    Super Contributor
    You can have a Groovy script (called say "StartScript") to successively change the source file for the Properties

    testRunner.testCase.getTestStepByName("Properties").setSource("theNextFile")


    Then another at the end of the test case to loop around ("LoopScript")

    testRunner.gotoStepByName("StartScript")


    Of course you also need to know when to stop!
  • feflicker's avatar
    feflicker
    New Contributor
    Ahh, thank you! I'm new to the tool and haven't investigated groovy scripts yet. Sounds like that's where I need to be spending my time. Appreciate the help!