Forum Discussion

ANB's avatar
ANB
New Contributor
17 years ago

Help with SoapUI Pro - Excel Datasource

Hi,

I am new to the soapUI Pro application, but have used soapui before where I have created new soap UI project with a WSDL file and run the requests.

Here is what I am trying to do with Soap UI pro version.

1) Create a soap ui project using a WSDL file.
2) Create a test suite, test case and a request which points to an operation in the WSDL
3) Create an Excel Data source and run the above request with it reading the data fronm the excel worksheet.

I could do Steps 1, 2 and part of 3.

With Step 3, so far, I have created properties for each column in the spreadsheet, pointed the data source to the excel and run it. Once it is run, the rows from the excel's been populated in the data source results grid.
Now is where I don't know what to do or how to link this data to the request that I have.

Could anybody please help?

One more thing is the property list and the spreadsheet have only the mandatory data columns. Do I need to add the the optional property names to the property list and leave the corresponding column in the spreadsheet blank?

Please help!

Thanks in advance.
ANB

3 Replies

  • Hi,

    The next step is to get the data from the DataSource to your Request.
    This can be done in the Request Editor by right-clicking in the fields for the properties you wish to populate (make sure to double click first so that the property is in edit mode) and selecting the appropriate field under the "Get Data >" submenu.
    Once this is done for all needed properties, you need a DataSourceLoop TestStep. In it you simply specify the DataSource and the target request (if you have more than one request you need to specify the topmost one in the TestStep list).
    And then you're done! You should now have three TestSteps in the following order: DataSource, Request, DataSourceLoop.
    I hope I made it clear for you, good luck!

    /Dain
    eviware support
  • ANB's avatar
    ANB
    New Contributor
    Hi Dain,

    Thanks for your help, it worked!

    I now have another question. 

    I want to write the response into another excel spreadsheet.

    I went through the tutorials document and found the DataSink option. But I am not able to figure out how to define the properties and assign values from the response. Could you please explain? And what would be the order of test steps? DataSource, Test Request, Data source Loop and DataSink? How would I link the the test response to the DataSink?

    I really do appreciate your help.

    Thanks,
    AnB
  • Hi AnB,


    Indeed, you can and should use DataSink to store the results (i.e. parts of the response) of your Requests to an Excel file.

    You need to add a DataSink test step (e.g. SaveToExcelDataSink) between Request and DataSourceLoop test steps. Then you need to define properties and use context menu (right click) to access "Get Data..." menu to select from the source value for each property.

    Make sure the output Excel file already exists. I just discovered a bug manifesting when Excel DataSink output file does not exist and which will most probably be fixed in the next version.

    If you need to extract node elements from an XML-structured SOAP body of your Request, the best way to do this is via a Property Transfer data step (which you would put between your Request and SaveToExcelDataSink test steps).


    Do let is know if you have made a step forward or if you need more help.


    Cheers!
    /Nenad Nikolic a.k.a. Shonzilla