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.

Dynamic request payload generation for different test cases

engg_satyajit
engg_satyajit Posts: 6
edited January 2022 in SOAtest

I have a requirement where I need to generate the payload dynamically before sending the request to a service. Here, I have total 30 test cases where the structure of the payload is different for each test cases.

Our main XML payload:

<?xml version="1.0"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
with XML.</description>
</book>
</catalog>

I need to change the above XML depending on the testcase requirements as shown in the below example.

For example,
Testcase 1: Send the request without having <author> tag.
Testcase 2: Send the request without having <title> tag.
Testcase 3: Send the request without having <price> tag.
Testcase 4: Send the request without having <publish_date> tag.
Testcase 5: Send the request without having entire <book> tag.
Testcase 6: Send the request without having id attribute of the <book> tag.
and so on.

How to perform this kind of scripting in SOATEST? Or is there any existing tool available in SOATEST?

Best Answer

Answers

  • Test case examples:
    For example,
    Testcase 1: Send the request without having <author> tag.
    Testcase 2: Send the request without having <title> tag.
    Testcase 3: Send the request without having <price> tag.
    Testcase 4: Send the request without having <publish_date> tag.
    Testcase 5: Send the request without having entire <book> tag.
    Testcase 6: Send the request without having id attribute of the <book> tag.
    and so on.

  • Thank you @benken_parasoft