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 do I use scripts to send random numeric values

LegacyForum
LegacyForum Posts: 1,664 ✭✭
edited December 2016 in SOAtest
as part of the SOAP request?
  1. Select the SOAP Client node you would like to configure.
  2. In the Parameters section of the right GUI panel, select Method from the Value drop-down menu.
  3. Click the User Method Properties button. The User Method Properties dialog box displays.
  4. Enter the following script in the Text box.


# Creates a a random integer in the range [0, 10]. from java.util import Random randomGenerator = Random() def getRandom(): return randomGenerator.nextInt(10)

  1. Click OK. An integer between 0 and 10 will be returned.
Tagged: