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.

How to fetch value from database base and pass in another call

priyagautam
priyagautam Posts: 10

I am using DB tool to write query and fetching All Id messages (will have in xml)and then i am using rest client and want to pass those messages details in payload but how to do that?
I want to use individual req for each id and want to pass directly to payload

Answers

  • benken_parasoft
    benken_parasoft Posts: 1,302 ✭✭✭
    edited October 2023

    Add a Writable data source to your test suite then chain an XML Data Bank to your DB Tool's "Results as XML" output. Configure the Data Bank with an extraction for "id" with "Writable data source column" selected. Lastly, create a child test suite with a REST Client that has its request payload configured to use "id" from the Writable data source. The REST Client in this child suite will iterate over the rows of the Writable data source, generating an individual request for each "id".