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
- 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 icon.
- Right-click the agent computer, and then click Open.
- Under Property Groups, click General Properties, and then click Add.
- In the New Property window complete
these steps:
- In the Property Name field, type RPT_VMARGS.
- In the Operator field, confirm that the operator is =.
- 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.
- Only one
RPT_VMARGS
argument is allowed for each agent computer location. If multipleRPT_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: