Using random variables in SilkPerformer scripts


You can modify a recorded script to provide dynamic and random input. For example, to randomize the entry selection from an AR Systemtable, parse the available entries into an array, and then randomly select an element from that array. From the known array length, randomly pick an element from 1 to the array length value:

gnElementNum := RndUniN(1..gnTotalRequests);

Then replace the entry request ID value with the array element:

"  <Array name=\"qual_field_values\">\r\n"
"    <string>"+ gaRequestID[gnElementNum] +"</string>\r\n" //REQ000000009577
"  </Array>\r\n"

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Helix Innovation Suite 25.2