Forum Discussion

Paramanand_Ghod's avatar
14 years ago

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


How can I store the response values into external file like excel. And verify the output values with expected values.

I will appreciate any help

Thanks in advance,

9 Replies

  • SmartBear_Suppo's avatar
    SmartBear Alumni (Retired)

    For asserting response please check ... tions.html .
    As for saving response in excel file you can do it by Transfering request.response through a PropertyTransferTestStep to an Excel DataSink TestStep:
    1. create the RequestTestStep whose response you want to save
    2. create PropertyTransferTestStep
    3. create DataSink TestStep, choose excel type, add a property with value empty and set the out file where to save the content
    4. in PropertyTransferTestStep set source to request/response and target to DataSink/property you've added
    After running the TestCase the eclel file you've specified in DataSink/out file should contain the response.

    • Hello17's avatar
      New Contributor



      I have multiple rows data in excel which I am passing through the single Request in soapuipro.

      For those multiple rows data I am able to get multiple response in soapui but not getting stored in the excel again.

      Only one response i.e first response is getting updated in excel.

      I have used data sink and to read multiple data I have used datasource loop.

  • Thanks for the prompt reply, but I am stuck at one place,

    In the excel Data sink, under configuration, the first field i.e. "File"
    What  should I enter into this field?

    After saving the response in the excel file, how could I match the values in the response excel with expected values through SOAP UI pro.
    I mean to say can we automate the verification step?

  • SmartBear_Suppo's avatar
    SmartBear Alumni (Retired)

    The description of the configuration options are available in the user guide, right here

    File - the source excel file to use as a template for adding data
    Out File - the target excel file to write. If not specified the data is written to the source file
    Worksheet the worksheet to which the data should be added
    Start at Cell - the top-left cell to start at when writing data.

    As for verifying, I would recommend you do this first, in the form of Assertions on the Request step.
    Good luck!

  • Thanks a lot, now I am able to transfer the values of response into the excel.
    Now I want to compare the response value with the expected value.

    Please let me know hoe to do this.

    Thanks again,
  • SmartBear_Suppo's avatar
    SmartBear Alumni (Retired)

    Unfortunately we don't have an option of asserting excel file, but it is the same as if you asserted the response from the RequestTestStep. You can do this after running a request in two ways:
    1. in response/outline view position at the node that you want to assert, by right clicking you'll get Add assertion/for content (along with other options)
    2. on request desktop panel open Assertions inspector in the bottom left part and click on the "+" , then from the list select Xpath Match. In the dialog that opens you can click on declare - to select the node from response (in the upper part), and on content to select the comparing content (in the bottom part).

    Also you can check ... _Assertion, although the dialog is changed a bit since the last documentation update you might find it usefull.

  • Thanks for the prompt reply.

    But I am only able to do validation for just one response. how to do if I have multiple numbers of responses.

    Here is my scenario:
    I have to pass three rows of input data to request through excel file.
    Then I stored the values of all the three responses in another excel file.
    Now I want to validate all the three responses values, but the way you suggested I am only able to validate one response.

    Is it possible to validate all the responses through SOAP UI Pro?

    Please let me know if you need more information. We are not able to proceed further.

  • Also let me know which datasource can we use apart from excel, for which SOAP UI pro can assert.
    Also can we assert excel file through groovy scripting.