Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

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

Options
hemanthpv
hemanthpv Posts: 8

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

Comments

  • jakubiak
    jakubiak Posts: 798 admin
    Options

    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_parasoft
    benken_parasoft Posts: 1,231 ✭✭✭
    Options

    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.

  • hemanthpv
    hemanthpv Posts: 8
    edited February 2021
    Options

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

  • benken_parasoft
    benken_parasoft Posts: 1,231 ✭✭✭
    Options

    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.

  • hemanthpv
    hemanthpv Posts: 8
    Options

    Makes sense..Thanks Once again