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.

How to change data source values in xml-request before sending?

capbirck
capbirck Posts: 2

In SOATest I have a SOAP-test that takes its values from a data source (an Excel-file). How can I change specific values in the request based on values from the data source?

Example:
The field "CustomerID" needs to have either a random UUID-value or a specific UUID-value. In the Excel-file the field value is set to "Auto" in the cases where a random value is needed and to the specific value when that is needed.

I have a Jython-script to generate UUIDs, but I need a way to use that script when the value "Auto" is encountered.

Best Answer

  • capbirck
    capbirck Posts: 2
    Answer ✓

    Solved.

    I use a field script that takes a single parameter (context) and from that I can get the value from the datasource with value = context.getValue("data source", "column name").

    Based on the value, the function can return the desired output which will then be put into the field.