Forum Discussion

mkhan031486's avatar
7 years ago

How to use DataSource and DataSource Loop in multiple test cases

I'm testing in SoapUI Pro and want to use DataSource and DataSource Loop in my test steps. Below are my tests


1- Create a New Order/Account

2- Give Customer a Discount

3- Refund The Customer

4- Disconnect the Account


Now, what I would like to do is create a datasource and datasource loop that when I run test 1 to 4, I should use one set of data, and then after customer gets disconnected, my test should go back to 1 and use different sets of data defined in my datasource. 


I would like to repeat that about 4 -5 times. 


Is that possible? If yes, how can I do that. Do I need to converge all my test cases together in one single test case and then use datasource and datasource loop??

1 Reply

  • lakshmiarun's avatar
    SmartBear Alumni (Retired)



    I believe this can be done only by creating different test cases for your test steps along with the data source and data source loop test step.


    It's pretty unlikely on the same test case since SoapUI Pro runs through all the values in the data source and can't be locked per run. 


    The only other way you can get this is writing a custom groovy script, that can give you more control on what you are looking for.