Somehow , SoapUI came in to my mind and started experimenting it and found out that soapUI pro has the features which will be beneficial to us. Here is the experiment.
Needs:
1. We should be able to parametrize a value in the request (say customer Id), reading a value from an external file.
2. Read one field value from the response(say account balance) and write to a file against the input value.
3. We should be able to issue the request in a loop(same as the number of customer ids in the external file)
Solution:
Step 1:
Create a new project giving the WSDL location. Identify the request, right click and click on "Add to TestCase". It will automatically create a test suit for you.
![]() | ||
| Fig: 1 |
Now the project will look like Fig 1.
Step 2:
Now we need to think about our needs . We should be able to read a value from the file . To achieve that SoapUI has a concept called DataSource. We should be able add another test step for this. Right click on testStep, click on add Step , and choose DataSource.
![]() | ||
| Fig : 2 |
![]() | |
| Fig : 3 |
Now double click on the DataSource and the editor opens on the right panel.
![]() | |||
| Fig : 4 |
Step 3:
Now we have to hook this property to the request . In order to do that, double click the request, the editor open up on the right panel then click on the Form tab. Choose the request parameter you want to get from the DataSource. Click on the "Get Data" and choose it from the DataSource property.(See Fig : 5)
![]() | |
| Fig : 5 |
Step 4:
Now we need to add a DataSink which is the file where we store the values from the response. It is similar to the DataSource creation. Add a new property (say PaymentType). Then choose the DataSink file location and type
![]() |
| Fig : 6 |
Now we need to tranfer the response values to the DataSink. For that execute the request and get the response. change the response editor to "Outline" . Right click on the filed which you want to export. Click on "Transfer To" and point it to the DataSink property we created in the previous step.
![]() |
| Fig : 7 |
![]() |
| Fig : 8 |
Now finally we need run these step for each value in the DataSource. Add and configure a DataSource Loop step in to the Test Steps.
Now we are done with all the set ups. Add some value to the Data Source and run the test case . It will run as many times the data rows in the DataSource. It will create a new DataSink file at the configured location.
One important thing to be noticed is that we can transfer any number of parameters from the Data Source to request and from response to Data Sink as well.








