Customizing HTML User Data With a New Parameter

Before proceeding, ensure that all static session information has been removed from your test script and that the most recent Try Script run produced a TrueLog that is open in TrueLog Explorer.

With HTML-based applications, the goal of user-data customization is to customize values submitted to form fields.

This task explains the process of creating a parameter based on a random variable.

  1. Choose File > Add TrueLogs to load a TrueLog into TrueLog Explorer. The TrueLog must be based on a Try Script that has had all static session information removed from it.
  2. Click Customize User Data on the workflow bar. The Workflow - Customize User Data dialog box opens.
  3. Click the Customize user input data in HTML forms link. TrueLog Explorer then performs the following actions:
    • Selects the first WebPageSubmit API call node in the menu tree.
    • Opens the Step through TrueLog dialog box (with the Form submissions option button selected).
    • Displays Request view

      Request view shows the page that contains the HTML form that was submitted by the selected WebPageSubmit call. When your cursor passes over a form control, a tool tip shows the control’s name in addition to its initial and submitted values; an orange line indicates the corresponding BDL form field declaration in Form Data view below.

  4. Click Find Next or Find Previous on the Step through TrueLog dialog box to browse through all WebPageSubmit calls in the TrueLog (these are the calls that are candidates for user-data customization).
    Note: Highlighted HTML controls in Request view identify form fields that can be customized.
  5. 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.

  6. Click the Create new parameter option button and then click Next to create a new parameter. The Create New Parameter page opens.
  7. Click the Parameter from Random Variable option button and then click Next. The Random Variable page opens.
  8. 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.
  9. Enter a name for the variable in the Name text box.
  10. Optional: Create a new random variable file by clicking New in the File group box.
  11. Specify whether the values should be called in Random or Sequential order. The Strings from file random variable type generates data strings that can either be selected randomly or sequentially from a specified file.
  12. In the File group box, select a preconfigured data source from the Name list box and then click Next. The Choose the kind of usage page displays.
  13. Specify the new random value to use by selecting one of the following choices:
    • Per usage
    • Per transaction
    • Per test
  14. 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.