Troubleshoot TruClient scripts

This section describes troubleshooting and limitations for TruClient scripts.

In this topic:

Replay issues

You may encounter issues with the following actions when replaying a script.

Clicking on an object

There are several possible reasons for replay failure when clicking on an object:

Possible Cause Try this
Scrolling to the object changes the DOM state Insert a "Scroll <object> into view" step before clicking on the object. Insert the scroll one step above clicking the object. You can also try a "Wait for Object" step before the click.
Imprecision in recording or replaying the exact location of a click on a control Click the right edge of the control, or in the exact center.
Cause unknown Replace the click step with an Evaluate JavaScript on Object step. For example: Evaluate JavaScript object.click() on button

Uploading files

If your script contains steps to upload files using a Windows Explorer dialog box, replay may fail.

In most cases, it is possible to work around this issue by using custom JavaScript or C code. Contact Software Support for a solution.

Dragging a slider or map

If dragging does not work correctly during replay, for example, when dragging a slider or a map, try one of the following:

  • Use one of the Alternative Steps.

  • Set the values manually until they meet your needs (for example, the precise number of pixels you would like to drag in each of the relevant directions).

  • Use the "Drag to" capability (by changing the Action of the Drag step in the Step section of the step properties). This way, you can drag your object to a relative position from another object.

JQuery sliders may need two replays to verify that the script replay succeeded. If TruClient cannot find the slider object, update the object and restart the replay. See Object identification.

Page containing videos

When you scroll past a video, TruClient may record a Play video step even if the play button of the video is not pressed when recording the step. If the Play video step causes replay problems, delete it.

Back to top

Browser issues

You may encounter the following browser issues.

Different results in different browsers

If you get different results for same load test run in different browsers, see End events, run times, and transaction times on different browsers.

Error message: VuGen cannot open the TruClient browser

This error has occurred because you do not have the proper permissions to establish communication between VuGen and the TruClient browser.

Recommendation: Ask your administrator or a power user to run this command:

netsh http add urlacl url=http://127.0.0.1:<port_given_in_the_error_message>/ user=<DOMAIN>\<USER_NAME>

Example: netsh http add urlacl url=http://127.0.0.1:8080/ user=DOMAIN\john

Error message: VuGen cannot open the TruClient browser because the port range is busy or invalid

To open a server, a free port is needed. The server is open on the http://127.0.0.1:<free_port>/ URL.

You can configure the free port in the following xml file:

%APPDATA%\Hewlett-Packard\LoadRunner\Data\Settings\VuGenProperties.xml

<VuGenProperties>
<BrowserCommunicationServerEndPort value="8090" />
<BrowserCommunicationServerStartPort value="8080" />

The default port range is between 8080 through 8090. If there is a problem with the ports (all ports are busy or the start port is bigger than the end port), you can change the range in the configuration file.

If you are unable to resolve this issue, contact Software Support.

Back to top

Using non-English languages

The following issues may be related to the use of non-English languages with TruClient.

Error replaying a script saved in a non-English path

If you have saved a TruClient script in a non-English path, you might encounter errors when you try to replay the script.

Solution:

  1. Change system locale to the language that is used in the script path.

    Control Panel > Region and language > Administrative > Change system locale

  2. Set the Formats to same language as you did in step 1.

    Control Panel > Region and language > Formats > Format

  3. Restart the computer.

Generic Browser Action issue on Chinese-language computers

On Chinese-language computers, when you drag a Generic Browser Action into a new script and set the location as a parameter created with the context menu, navigation may fail. This occurs only the first time. Drag the Generic Browser Action again and create the parameter for the location again.

Back to top

TruClient Standalone and legacy scripts

You may encounter the following issues when running scripts developed in TruClient Standalone or in older versions of TruClient.

Note: A script cannot be edited or run in a version older than the one in which the script was developed. For example, if you participate in a beta program, you cannot use scripts created in the beta on your production installation, which has a lower version number.

Unique parameters in TruClient Standalone scripts

Scripts developed in TruClient Standalone that contain unique parameters may not run as expected.

Workaround: Create the script using TruClient in VuGen.

Runtime settings lost when working in both VuGen and TruClient Standalone

Do not edit runtime settings when a project is open in both VuGen and TruClient Standalone.

Script view is null after converting a legacy TruClient script to TruClient Web

The script view is populated after saving the script in interactive mode. This is by design.

Back to top

Other issues

Failure to save or replay a script

If you cannot save or replay a recorded script, check the proxy exceptions box of Internet Explorer. This applies if the script is recorded in a different browser then replayed on Internet Explorer.

Open IE Internet Options > Connections > LAN settings > Advanced > exceptions. The content of the proxy exceptions box must not be "<-loopback>" data. It should be null or "127.0.0.1;localhost"

Event handler failure

If Simulate New User is enabled in the runtime settings, an event handler is not triggered if the event happens in the last step of the Init section.

Workaround: Add another step after the last step in the Init section, such as a Wait step.

Word verification (CAPTCHA)

Web sites may use word verification fields that display text that the user must enter to verify that the user is not a machine. Such verification blocks automated usage of the page, including running automated tests.

If your script fails because of word verification failure, you must cancel this function on the Web site you are testing.

Tips for handling timeouts, object not found, and short or long transaction response time

For troubleshooting tips on handling timeouts and instances of "Object not found", short transaction response time (TRT), network timeout and long TRT, see the Test the performance of your Salesforce web applications using TruClient blog post.

Error: Invalid JSON string

Issue: The Vuser log shows the following error: “Error -205177: SyntaxError: Invalid JSON string: Unexpected identifier parsing:xxxxxx”.

Possible cause: An object such as a document or contentDocument is stored in a JavaScript step. For example:

1 var innerDoc = iframe.contentDocument

2 innerDoc = iframe.contentDocument

3 var docObject = document

4 docObject = document

Solution: Avoid saving these objects to global scope. Instead, save the object as a temporary variable.

To fix existing errors, use the following syntax:

1 let innerDoc = iframe.contentDocument

2 let innerDoc = iframe.contentDocument

3 let docObject = document

4 let docObject = document

Back to top

Running TruClient as a service

When running TruClient IE browser in service session (using a non-interactive user), there may be issues with the browser cache, and with HTML5 local storage (the local storage method enables Web applications to locally store data within the user's browser).

There are two possible workarounds available, as describe below. Application Performance Management users should use the second workaround.

Workaround 1

Tip: This workaround is recommended for LoadRunner Professional and LoadRunner Enterprise users.

You can run the browser with interactive user credentials. This solution requires a valid interactive user in the relevant domain, with the permissions created by your administrator.

  1. For both LoadRunner Professional or LoadRunner Enterprise:

    On the load generator machine, edit the file “logon_user_config_file.cfg” located in the <LoadRunner installation directory>\launch_service\dat folder. Configure the logon type as LOGON32_LOGON_INTERACTIVE instead of LOGON32_LOGON_SERVICE, and restart the LoadRunner agent service.

  2. Do one of the following, depending on if you are working with LoadRunner Professional or LoadRunner Enterprise:

    • For LoadRunner Professional:

      Use the LoadRunner Agent Runtime Settings tool to set the Allow virtual users to run on this machine without user login credentials. This affects all Vusers in all protocols. See LoadRunner Agent Runtime Settings Dialog Box in the LoadRunner Professional Help Center.

    • For LoadRunner Enterprise:

      Solve the service session issues by configuring the credentials for the agent remotely, from the LoadRunner Enterprise UI. For details, see Reconfigure the LoadRunner Agent user in the LoadRunner Enterprise Help Center.

Workaround 2

Tip: This workaround is recommended for APM users.

There are two ways you can define user credentials for the service session.

  • (Recommended) You can set BPM to run as a specific user from BPM Admin by selecting the Run as a specific user option, and configuring the following parameters:

    UI Element Description
    User name The specific user name. This is a mandatory field of up to 24 characters. The name cannot include spaces, non-Latin characters (such as Greek or Cyrillic), or any of the following characters: ( ; : " <> * + = \ | ? , ).
    Password The user’s password.
    Domain

    The domain for the user. The domain name can be up to 67 characters long and can include the following characters: 0-9, a-z, A-Z, hyphen (-), and underscore (_). The domain name cannot start or end with a hyphen (-) or underscore (_) and cannot include spaces.

    Note: Setting BPM data collection to run as a specific user limits user access to resources, settings, and applications located on the local machine.

    For more details, see the BPM Deployment guide.

  • Alternatively, you can define user credentials for the service session in the TruClient Supportability Tool. This solution affects TruClient IE Vusers only. See Configure user credentials for service session.

Back to top

See also: