Encoding Passwords and Text

You can encode passwords, and mask text in your script to hide passwords and other confidential text strings.

Encode a password

The password encoding tool enables you to generate masked passwords that you can use as arguments in your script or as parameter values.

For example, your Web site may include a form in which the user must supply a password. You may want to test how your site responds to different passwords, but you also want to protect the integrity of the passwords by hiding the plain-text password values.

  1. On the LoadRunner machine, select Start > All Programs > HPE Software > HPEVirtual User Generator > Tools > Password Encoder.

  2. Enter the password in the Password box.
  3. Click Generate. The Password Encoder masks the password and displays it in the Encoded String box.
  4. Click Copy to copy the encoded string to the clipboard.
  5. In the script, paste the encoded string into an lr_unmask function.

    For example:

    lr_start_transaction(lr_unmask("3c29f4486a595750"));

Back to top

Mask a string

You can mask text in your script to hide confidential text strings.

For example, you may want to hide personal user information, such as social security or ID numbers.

To mask a string in the script:

  1. Select the text you want to mask.

  2. Right-click and select Mask string.

    VuGen masks the visible string and adds an lr_unmask function call.

    VuGen uses the original string value while displaying an encoded (masked) string in the script.

To restore a masked string:

  1. Select the masked string.

  2. Right-click and select Restore masked string (<string>).

See also: