Adding a SAPGUI Parsing Function

For any SAPGUI function call in which input data is inserted, you can insert a parse-value function. Value parsing can be useful for enabling replay when session-specific strings must be parameterized to enable accurate replay. For instance, you might parse customer IDs into a parameter that is inserted into a customer ID field.

Though toolbars and title bars cannot be parsed, most common controls can be parsed, including text fields, field labels, combo boxes, buttons, and more.

  1. In Source view or the Controls menu tree, select a control field for which you want to parse a value. Controls that can be verified have blue outlines around them. Most controls that are outlined in orange can also have their values parsed.
  2. Right-click within the control field and choose Parse Value. The Insert Value Parsing Function dialog box opens and offers settings by which the parsing function can be adjusted.
  3. Optional: In the Parameter name text box, enter a name for the parameter that is to receive the result of the parsing function.
  4. Optional: In the Informational statement insertion area, click Print statement to insert an informational print statement into the script.
    The result of the parsing function will be written to the Silk Performer Virtual User Output window.
  5. Optional: In the Informational statement insertion area, click Writeln statement (write line statement) to write the parsed value to an output file to facilitate debugging (in addition to writing the value to the Virtual User Output window as a Print statement does).
    Because generating output files alters the time measurements of load tests, these files should only be used for debugging purposes and should not be generated for full load tests.
  6. Click OK. The parsing statement is inserted into your test script.
Once you have customized how your script handles session information and user-input data, you have added all necessary verification functions, and have completed any required manual BDL script editing via Silk Performer, your testing script should run without error.