Tuesday 30 July 2013

Issue in replay due to redirections

If your application has URL redirections, you may experience issues while replaying if the redirection depth is set to zero. For instance, you may encounter error messages similar to the following: "Action1.c(x): Redirecting "http://easyloadrunner.com " (redirection depth=0)" followed by "Action1.c(x): Error: Failed to connect to server..."

The root cause of this issue is that the redirection depth is set to zero. To overcome this problem, you can implement one of two solutions: either modify the config file or use a function in your script to change the value.

To modify the config file, follow these steps:

1. Navigate to the \template\qtweb directory.
2. Open default.cfg in a word editor.
3. Locate the [web] section.
4. Add an entry for MaxRedirectionDepth and set its value to the desired number of redirections (e.g., MaxRedirectionDepth=x, where x is the desired number).

Make sure to repeat the above steps for the default.cfg file in the script folder as well.

Alternatively, you can use the web_set_option function in your script to change the redirection depth value. Here's an example of how to do it:

web_set_option("MaxRedirectionDepth", "4", LAST); // Sets the maximum redirection depth to 4.

No comments: