Forum Discussion

rakesh_ku_singh's avatar
rakesh_ku_singh
New Contributor
15 years ago

How to store response values into excel using SOAP UI pro?

How to store response values into excel and verify the same with expected through SOAP UI pro

6 Replies

  • k2cjw's avatar
    k2cjw
    New Contributor
    Create a datasource in your teststeps, adding the number of properties that you would like to be added to your excel file. From the datasource tab, select excel as your datasource type.
    From your soapui test,  right click and selcet get data.  Find the test you want to get  the information from and pick property [Response]. From teh select Xpath window that opens up select the information you want to add. That should get you the information that you are looking for. NOTE if you are using an excel vesrion newer that 2003 you need to ensure that you change the ecxel file type to xls, be default it goes to xlsx.
  • morciani's avatar
    morciani
    Occasional Contributor
    I am doing something very similar. with soapUI Pro. I'm using a DataSource (Excel) that has some data elements that are used in submitting requests AND the expected results for responses.  I've got the following steps in my test case:

    1. DataSource
    2. Test Request (with Assertions that reference columns in DataSource)
    3. DataSource Loop (points to 'Test Request')

    If you wanted to save bits of data included in the responses into the same Excel sheet, you could add a DataSink step that references the same Excel sheet in  the DataSource like this:

    1. DataSource
    2. Test Request (with Assertions that reference columns in DataSource)
    3. DataSink (Excel, reference the same sheet in the DataSource step)
    4. DataSource Loop (points to 'Test Request')

    This should get you on your way.

    -Mike
  • JerBa's avatar
    JerBa
    New Contributor
    Hi,

    you could also create a groovy script, which reads your response XML and adds all the data via properties to the datasink. That way you do not have to define all the properties and xpaths for every single element you would like to write to your excel file.

    Check http://www.soapui.org/userguide/functio ... ipt_Editor for mor details.

    Regards
  • Hi,

    I have Soap UI Pro 3.6.1 and when I create a data sink or data source test step, I am not able to configure it. When I try to select a source from the drop down, it doesn't seem to save that. Please help me.

    Thanks,
  • Hi, I used the Grid data source ( 2 rows) to feed values to the test request and created a datasink to capture the test response. The response contains ( 5 records for each test request params, total 10 result rows). I used 'Transfer To' option from 'Response' to send the the results to data sink. How ever I'm not seeing only first record for each test request in the result xls ( only 2 rows). How do I get all the result records into the data sink xls?
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello,

    Just a reminder that if you are a soapUI Pro user, you have access to Pro support by eviware software in the soapUI Pro Board. Your user credentials for the forum should have been sent to you in the same e-mail as your license key. If this doesn't help, we need your license information to be able to help you (e-mail your license details to support@eviware.com).

    /Henrik @ eviware support