Customizing User-Input Data for a Form Field

Under real world conditions, SAPGUI-application users submit unpredictable combinations of data into forms. One goal of effective SAPGUI application testing is to emulate such irregular and diverse user behavior in test scripts.

You can customize the user-input data that is entered into forms during testing with the Parameter Wizard. The Parameter Wizard lets you specify values to be entered into form fields, enabling your test scripts to be more realistic by replacing recorded user input data with randomized, parameterized data.

  1. Select a TrueLog in the TrueLog menu tree. TrueLog content appears on the Response and Information pages.
  2. Choose Edit > Step through TrueLog . Alternative: Click Step through TrueLog on the toolbar. The Step through TrueLog dialog box opens.
  3. Click the Customizable calls option button and click Find Next to step through all form fields in the TrueLog that offer input customization.
    Note: Controls that can be customized are outlined in orange. Controls that have already been customized are outlined in green. Controls that are outlined in blue can have their values parsed or verified, but they cannot be customized.
  4. On the Request page, right-click the form control that you want to customize and choose Customize Value. You can replace the recorded values with various types of input data (including predefined values from files and generic random values) and generate code into your test script that substitutes recorded input data with your customizations. The Parameter Wizard opens.
    With the Parameter Wizard you can modify script values in two ways:
    • Use an existing parameter that is defined in the dclparam or dclrand sections of your script.
    • Create a new parameter based on a new constant value, random variable, or values in a multi-column data file.

    After you create a new parameter, that parameter is added to the existing parameters and is available for further customizations.

  5. Click the Create new parameter option button and then click Next to create a new parameter. The Create New Parameter page opens.
  6. Click the Parameter from Random Variable option button and then click Next. The Random Variable page opens.
  7. From the list box, select the type of random variable that you want to insert into your test script and then click Next. A brief description of the selected variable type appears in the lower window. The Name the variable and specify its attributes page opens.
  8. Enter a name for the variable in the Name text box.
  9. Click Finish. Your test script now uses the random variable for the given form field in place of the recorded value. The new random variable function appears on the BDL page.

Initiate a Try Script run with the random variable function in your test script to confirm that the script runs without error.