Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SVC2021.1

...

Table of Contents
maxLevel1

...

Adding Proxies

Right-click on a server in the 

...

Double-click the added node to open its configuration panel and configure the proxy on the following tabs. When you are done, you can enable the proxy as described in Enabling and Disabling Proxies then start recording as described in Recording Traffic from Message Proxies.

General Tab

.

In On the General tab, rename the proxy and enter a description (optional).

Click the Http Listeners tab so that you can configure the ports on which your HTTP(S) .

...

listeners should listen. HTTP listeners simplify the connection configuration for recording HTTP traffic: 

Click Add Listener and specify a name for the listener.

Click Add Port and enter a port number. You can enable the message proxy to automatically assign a port by specifying 0 as the port number. When the proxy is enabled, the assigned port number will appear in the console. The port is randomly assigned every time the message proxy is changed/enabled. You can also send a GET request to the messageProxies API endpoint to return the automatically-assigned port number. See Creating and Modifying Assets through the REST API for additional information. 

If the client sends traffic over SSL, enable the Secure option and enable your verification options. See SSL Settings for Listener Ports for details.

Click OK to exit the port editor.

Click Add to add additional ports to the listener or OK again to finish adding the listener.

Open the Connections tab to

...

On the Connections tab you can specify the endpoints where the proxy should listen for messages and where the received messages should be directed. For each endpoint you want to use the proxy, do the following:

Click Add.

Select the appropriate transport type.

Complete the proxy settings as follows:

HTTP

...

/HTTPS: See HTTP

...

Configuration.

...

JMS: See JMS Configuration.

MQ: See MQ Configuration.

Internal: See Internal Transport Configuration. Internal proxies can direct traffic to virtual assets or other internal-transport proxies. This can reduce the number of queues when deploying complex virtual assets as well as increase the performance of virtual assets when routing internally.

In the Traffic file field, specify where you want to save the traffic data that will be captured when the proxy is set to record mode. You can later use this traffic file to generate virtual assets that represent the live traffic captured in record mode. See Transferring Files Between the Remote Server and the Local Machine for an easy way to access the recorded traffic file.

By default, traffic will be recorded in a file named %n_%d_%t.txt(<proxy_name>_<current_date>_<current_time>.txt). It will be stored within the recorded_traffic folder (this will be created if it does not exist). You can modify the file name, but not the folder. The folder is always located within the VirtualAssets project.

When specifying the file name, you can use variables such as %d (current date) %t (current time), %n (proxy name), and %u (unique time-based id). Wildcards can be used together and mixed in with the name. For example, you could use %nProxyTraffic%d or %u_%d%nTraffic

...

Do not configure multiple proxy connections to write to the same traffic file at the same time. This could corrupt the traffic file.

In the Recording Session area, specify how you want traffic data recorded in traffic files:

Append new session data adds new traffic data to an existing traffic file (the one specified in the Traffic file field). If the specified file does not already exist, a new file will be created. See More on Recording Session Options below for additional details.

Overwrite session data overwrites the traffic data in an existing traffic file (the one specified in the Traffic file field). If the specified file does not already exist, a new file will be created. See More on Recording Session Options below for additional details.

New session file for each message pair (HTTP and internal only) creates a separate traffic file for each request/response pair. See More on Recording Session Options below for additional details.

Click OK

...

Http Listeners Tab

On the Http Listeners tab you can configure the ports on which your HTTP(S) listeners should listen. HTTP listeners simplify the connection configuration for recording HTTP traffic. There are two types available:anchorReverseProxyListenerReverseProxyListenerReverse Proxy

This type of listener starts a port that listens for traffic and can be used to forward to either a live service or a virtual assets. This is best used when the application under test has configuration options that allow the user to configure the host and port used to connect to the backend service.

To add an HTTP Listener:

  1. Click Add Listener and select Reverse Proxy from the Type dropdown.
  2. Specify a name for the listener.
  3. Click Add Port and enter a port number. You can enable the message proxy to automatically assign a port by specifying 0 as the port number. When the proxy is enabled, the assigned port number will appear in the console. The port is randomly assigned every time the message proxy is changed/enabled. You can also send a GET request to the messageProxies API endpoint to return the automatically-assigned port number. See Creating and Modifying Assets through the REST API for additional information. 
  4. If the client sends traffic over SSL, enable the Secure option and enable your verification options. See SSL Settings for HTTP Reverse Listener Ports for details.
  5. Click OK to exit the port editor.
  6. Click Add to add additional ports to the listener or OK again to finish adding the listener.

...

Starts up an HTTP Proxy that can route traffic based on the “Host” header. This is best used with Mobile applications where the backend service endpoint is not configurable or in applications under test when there is no configuration option available to change the host and port used to connect to a backend service.

To add a system listener:

  1. Click Add Listener and select Forward Proxy from the Type dropdown.
  2. Specify a name for the listener.
  3. Enter a port number.
  4. Click OK to exit the port editor.
  5. Click Add to add additional ports to the listener or OK again to finish adding the listener.

Proxy Examples

The decision whether to use a reverse proxy or a forward proxy often depends on whether you want to record application traffic or mobile traffic. Examples of how you would record both are shown below:

Example 1: How to record application traffic

  1. Create a new Message Proxy.
  2. Create a reverse proxy listener on the desired port.
  3. Create an HTTP Reverse proxy connection for all traffic.
  4. Enable recording.
  5. Direct your AUT to use the virtualize server "host" and reverse proxy listener "port".

Example 2: How to record mobile traffic

...

You can now enable the proxy as described in Enabling and Disabling Proxies then start recording as described in Recording Traffic from Message Proxies.

Scroll pdf ignore

Configuring an HTTP Message Proxy Video Tutorial

This video describes how to set up a message proxy that can capture live traffic.

Vimeo
Height500
Width800
URLhttps://player.vimeo.com/video/297171705

...