Specifying the number of allowable URL redirects during test runs

When you run a test in a load-sharing environment, an unexpected redirection loop might occur during HTTP processing. An unexpected redirect response occurs when an HTTP request that normally returns a specific document redirects the browser to another location.

About this task

When the system detects an infinite loop of redirects, the infinite loop is broken, an error verdict for the request is issued, and the following message is displayed:

Infinite redirection loop detected getting URL n. If this is expected and understood, increase RPT_VMARGS rptMaxRedirection parameter. Redirected history (from the first URL to the current one).

The default number of redirects is set at 10; however, you can edit the maximum number of redirects by updating the RPT_VMARGS argument in the –DrptMaxRedirection setting.

To modify the number of allowable redirects before an error is reported, complete these steps on the workbench.

Procedure

  1. In the Test Navigator, expand the project until you find the agent computer at the deployment location to change.
    Agent computers are represented by the location icon, which looks like three little monitors icon.
  2. Right-click the agent computer, and then click Open.
  3. Under Property Groups, click General Properties, and then click Add.
  4. In the New Property window complete these steps:
    1. In the Property Name field, type RPT_VMARGS.
    2. In the Operator field, confirm that the operator is =.
    3. In the Property Value field, type –DrptMaxRedirection=n, where n is the maximum number of redirects that can occur before the error message is displayed, and then click OK.
    4. Only one RPT_VMARGS argument is allowed for each agent computer location. If multiple RPT_VMARGS style properties are required, you must separate-Dname=Value with a space. For example, -DrptMaxRedirection=15 -DanotherProperty=Value.
    The following New Property window sets the maximum number of redirects to 15:New Property window, which shows the Property Name set to RPT_VMARGS, the Operator set to Equals, and the Property Value set to DrptMaxRedirection=15