Response of a soap/rest test as expected result for diff control in subsequent tests

hemanthpvhemanthpv Posts: 8

Can response of a soap/rest test can be used as expected result for diff control in subsequent tests?


  • jakubiakjakubiak Posts: 707 admin

    If you need to immediately diff the response, then you can just add a Diff Tool to the SOAP/REST Client directly. If you want to save the response and diff it later, you have two options:
    1. Use a Data Bank tool to capture the root element (assuming it is XML or JSON), and then use the data banked value in a subsequent Diff Tool
    2. Attach a Write File tool to write the response to disk, and then configure the subsequent Diff Tool to use it

  • benken_parasoftbenken_parasoft Posts: 958 ✭✭✭

    Yes. You would first chain an XML/JSON Data Bank tool to capture the response. In your Diff tools, you would select the appropriate "Diff mode" (XML or JSON) then select "Regression Control Source > Data Source" and select the name of your data bank column.

  • hemanthpvhemanthpv Posts: 8
    edited February 1

    Thank you @jakubiak and @benken_parasoft . I had tried the write file option already, will try the data bank method now.

  • benken_parasoftbenken_parasoft Posts: 958 ✭✭✭

    Data Banks are intended for extractions, so you can pass data between test cases. That's exactly what it's for. I generally don't really recommend using the file system (Write file tool) as a means to pass data around. Aside from being really unnecessary and creating extra files on disk, it is also not efficient nor is it thread safe, preventing you from potentially leveraging your test suite as part of a load test, for example.

  • hemanthpvhemanthpv Posts: 8

    Makes sense..Thanks Once again

Sign In or Register to comment.