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.

Use data conditionally in a SOAP Client Tool

Options
StaticAnalysis
StaticAnalysis Posts: 17

Is it possible to conditionally use the value of cell (from an excel spreadsheet setup as datasource "CustomerAndProduct" say that contains 2 columns as shown below)

CustomerType CustomerNumber
New 0
Existing 123456

The end goal here is I want to use a SOAP client (which fetches) Customer details for "Existing" customer with ID 123456, skipping all those rows of data for new customer. What is the best way to achieve this? Thanks for the help in advance.

Comments

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

    It sounds like you want to skip running this test entirely for certain rows, is that correct? You can configure a test to conditionally execute based on the value of a test suite variable. Additionally, test suite variables can be mapped to data source columns.

    So, open the test suite that contains your SOAP Client, click the Variables then add a new variable of type "Data Source". You will be shown fields to provide the data source name, column name, and default value (not important for this case). Next, click the Execution Options tab, click Test Flow Logic, click the test in the tree on the left, set setup Variable Condition to check if your variable != empty.

    I just tried this myself and verified it works as expected. My SOAP Client's traffic viewer shows it only ran for rows where the data source column was not empty.