Recording via a proxy

This topic describes working with a proxy server when recording scripts.

About recording using a proxy server

VuGen allows you to record scripts using a proxy, to resolve situations where you cannot install VuGen on the client machine. This may be the case with certain Linux machines, Mac OS machines, and mobile devices.

When using this option, the VuGen machine acts as a proxy server capturing all the traffic from the client machine to the target server. After the business process has been recorded VuGen creates a script.

The following diagram illustrates the basic workflow (for recording via a proxy on a Linux machine):

Back to top

Considerations for recording via a proxy

The following provides information and prerequisites for recording via a proxy:

Supported only for some protocols

Recording via a proxy is not available for all protocols.

Partial list of supported protocols: Web - HTTP/HTML, Flex, Java over HTTP, Oracle NCA, and Oracle - Web 

Allow proxy configurations

The client must allow proxy configurations, meaning, you must be able to specify the port and the address of the VuGen machine on the client device or machine.

Some mobile native applications cannot be recorded in proxy mode. For example, the device might not support proxy, or the application simply ignores the device’s proxy. In these cases, other approaches might help, such as recording the traffic on the server side.

Same network The client device or machine and the VuGen machine must be in the same network.
Delete browsing history

Make sure to delete the client machine's browsing history prior to recording the business process. This is because VuGen cannot bypass the browser's cache and history settings on the client machine.

Deleting the browsing history enables VuGen to accurately record your business process via a proxy.

HTTP forwarding to multiple targets If multiple target machines are present, the VuGen proxy can correctly forward data to the right target server according to the Host HTTP header.
Forwarding to target server via Internet proxy server You can configure the VuGen machine to establish a connection with your organization's internet proxy by selecting the Remote Application via LoadRunner proxy mode in the Start Recording dialog box. For details, see Start Recording Dialog Box.
HTTPS (SSL/TLS) support for mobile devices

To record and decrypt HTTPS traffic, the proxy uses its own certificate to set up a secure connection with the mobile device, and uses the certificate of the actual server to establish a secure connection with the server.

For the browser to work with the proxy over a secure connection, you need to either declare a security exception, or install a root certificate. For details on importing an SSL certificate, see Use case 3: Client uses SSL.

Note: Some native mobile applications might reject the installed root certificate due to their own internal rules, and HTTPS traffic will fail to record. If this happens, contact your application’s developer for a workaround.

Back to top

Use cases for recording via a proxy

The following use cases describe various methods for recording a script using a proxy server. In all use cases, the client machine and VuGen machine are in the same network.

Use case 1: VuGen not installed on client machine

You want to record a business process but you cannot install VuGen on the machine (or device) running the application.

  1. Create a new Web - HTTP/HTML script.

  2. Start recording.

    1. From the Start Recording dialog box, select Recording Mode > Record > Remote Application via LoadRunner Proxy. For details, see Start Recording Dialog Box.

    2. Specify the port on which the LoadRunner proxy will listen, by default, port 8888.
    3. Check the Display recording toolbar on client machine. This allows you to see and interact with the recording toolbar on the client machine.
    4. If the client machine requires a proxy to access the Internet, set the following:

      • In Internet Explorer on the VuGen machine, select Tools > Internet Options > Connections.
      • Click LAN settings and enter the port and address of the client machine's Internet proxy.

        Note: The Use automatic configuration script option is not supported.

    5. Click Start Recording.
  3. On the client machine, delete the browser cache.

  4. Configure the client machine browser settings to specify the VuGen machine as the proxy server. Use the VuGen's machine IP for the address, and specify the port on which the LoadRunner proxy will listen.

  5. Record the business process.

    1. Navigate to your application.
    2. Perform the steps of your business process you want to record.

  6. Generate the script.

    Select Stop Recording from either the Recording Toolbar on the client machine or the Floating Recording Toolbar on the VuGen machine. VuGen generates the script.

    Note: It is common for business processes to use SSL communication even when not explicitly displaying a URL with HTTPS. In this case, a certificate may be required. Refer to Use case 3: Client uses SSL for more information on obtaining the certificate.

Use case 2: Record via proxy on mobile

You want to record an application on a mobile device. This could be a web application, or native mobile applications that use HTTP and HTTPS as the transport.

  1. Create a new Web - HTTP/HTML script.

  2. Start recording.

    1. From the Start Recording dialog box, select Recording Mode > Record > Remote Application via LoadRunner Proxy. For details, see Start Recording Dialog Box.

    2. Specify the port on which the LoadRunner proxy will listen, by default, port 8888.
    3. Check the Display recording toolbar on client machine. This allows you to see and interact with the recording toolbar on the mobile browser.
    4. Click Start Recording.
  3. (Optional) On the VuGen machine, set the proxy details. To do this from Internet Explorer, select Tools > Internet Options > Connections. Click LAN settings and enter the port and address of the client machine's Internet proxy. (The Use automatic configuration script option is not supported.

    Tip: This step is required when the application under test needs to access the internet, and you are connected to a corporate network that requires a proxy to access the internet.

  4. On the mobile device, clear the browser cache.

  5. Configure your mobile device to use the VuGen recording proxy. For example, on an iOS device, select Settings > Wi-Fi > HTTP Proxy > Manual. In the Server field enter the IP of the VuGen machine, and in the Port field enter the port that VuGen is listening on.

  6. Open the application under test from the browser on your mobile device and perform the steps of your business process you want to record. All web traffic will be recorded by VuGen.

Note: If you web application is using SSL communication, a certificate may be required. Refer to Use case 3: Client uses SSL for more information on obtaining the certificate.

Use case 3: Client uses SSL

Your application communicates using SSL.

  1. Prepare to import the LoadRunner SSL certificate to the client machine.

    Note: As an application developer, you can set certain policies on the server certificate when using SSL. However, only if the LoadRunner certificate conforms to the policy, can the client trust the server and the SSL connection be set.

  2. Download the certificate, by navigating to:

    http://<computer name of VuGen machine>:port/proxyroot.cer

    or

    http://<ip address of VuGen machine>:port/proxyroot.cer

    Note: If you experience security restrictions, navigate to:

    http://<computer name VuGen machine>:port/proxyroot.dat

    or

    http://<ip address of VuGen machine>:port/proxyroot.dat

    After downloading the certificate, change the .dat extension back to .cer to import the certificate.

  3. Import the SSL certificate. The following table provides examples of the path for various browsers.

    • For Internet Explorer, select Internet Options > Content > Trusted Root Certificate Authorities > Import.
    • For Firefox, select Tools > Options > Advanced > Certificates tab > View Certificates > Authorities > Import.

Use case 4: VuGen and the application under test on the same machine

You want to do a proxy recording of a local application that uses the system proxy, where VuGen and the application under test are on the same machine.

  1. Create a new Web - HTTP/HTML script.

  2. Set the recording option.

    Open the recording options (Recording > Recording Options) and select the HTTP Properties > Advanced node. Enable the Use the LoadRunner Proxy to record a local application.

  3. Start recording.

    1. Open the Start Recording dialog box.

    2. In the Recording mode section, select Record: Web Browser.
  4. Perform the business process.

    1. Navigate to your application.

    2. Perform the steps of your business process you want to record.

Back to top

After recording

  • VuGen automatically resets the proxy back to its original setting after the recording. If the recording did not end in the normal way, for example, if your application crashed during recording, you may need to manually set the proxy back to its original value. To do so, go to Internet Options > Connections > LAN Settings > Proxy server.

    If you are recording a Java application or a browser other than Internet Explorer, and the application is not using the system proxy settings, you will need to manually set the proxy of the application.

  • On mobile devices: Once you configure the Wi-Fi (WLAN) proxy setting, it will apply to all communication to and from the mobile device, which means that you might record traffic that is not related to your application, such as your email client. This noise can be removed manually after the script is generated.

Back to top

Got it!
Welcome to the help center for LoadRunner Professional, formerly known as LoadRunner. LoadRunner Professional is part of the new Micro Focus LoadRunner family of performance testing products.