Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.
Browser Testing Timeout Options
LegacyForum
Posts: 1,664 ✭✭
There are a number of timeout options available for configuration in WebKing. Below is a description of the options and what they control.
There are two timeout options configurable from the Preferences Panel:
1) Startup Timeout - This option controls how long WebKing will wait for the browser to tell WebKing that it is ready to begin testing. For Internet Explorer this happens when the start URL has been completely loaded (including images). Essentially this is the onload event of the very first page. For Firefox this happens when the document has been downloaded completely (the document may not have completely loaded yet). This is the equivalent of the DOMContentLoaded event for the first page. The default value for this preference is 60 seconds.
2) User Action Timeout - This option controls how long WebKing will wait for a response from the browser that a command has executed successfully. Because of the dynamic nature of web pages, it is possible that the element the command needs to interact with is not present immediately upon page load, therefore changing this value changes how long WebKing will wait for that element to appear and for the command to complete its execution before terminating the test with a failure. The default value for this preference is 12 seconds.
There is an additional Delay Settings option that is configurable for an entire scenario by clicking on the Scenario node in the Test Suite and scrolling to the bottom of the Browser Playback Options tab. The setting can be overridden by individual tests in the Configuration tab of those tests. By deault each test uses the scenario-level settings. Also by default, during recording WebKing sets each test to use either the Request wait time or the UI wait time - the test is set to use Request wait time if the browser makes requests to the server during that test, and the test is set to use UI wait time if the browser makes no requests to the server during that test. Here is more detail about the two Wait Time settings:
1) Request Wait Time - This option helps determine how long WebKing will wait after performing an action before it will move on to the next action. The behavior of this option is as such. After executing a command, WebKing will wait until there is a break in the communication between the browser and the server that lasts at least this amount of time. This break in communication means that all previous requests have received a response, and no new requests are made during that time. When WebKing sees this break, it determines that the page has finished loading, and it moves on to the next action to perform. This mechanism ensures that the browser is ready to execute the next command sent to it by WebKing (for instance, it ensures that the page element that the next action will be performed on appears on the page).
If no such break in communication is ever observed by WebKing, WebKing will wait for a maximum of time equal to the Connection Timeout setting in the Miscellaneous preferences before moving on and attempting the next action.
Making this value too small can cause WebKing to attempt to perform another action in the browser before the browser is ready to process another command. The default value for this option is 4000 milliseconds.
Here are a number of scenarios where you may need to increase the value of this option:
A. You receive a message during playback that says "browserDriver is undefined"
B. During playback, for a particular action you notice that WebKing shows that the test has finished, but the page in the browser has not finished loading.
C. You have a step in your application that takes a very long time for the page to render (sometimes this happens after an initial login). In this scenario often the browser has stopped receiving files from the server, but it is taking some time to process the JavaScript and render the screen.
2) UI Wait Time - This option helps determine how long WebKing will wait after performing an action before it will move on to the next action, much the same as for the Request wait time. However, this wait time is used for a specific test where no request is made by the browser to the server. The intent of this option is to make the amount of time it takes to fill out form fields very quick.
If more time is needed by a single test, than the user can choose to use a Custom wait time and specify how long to wait for only that test.
There is also a Wait command that can be used if the above are insufficient for the needs of your application. To add a Wait command select the scenario you'd like to add it to, and right click. In the wizard that appears select Browser Functional Test. You can then select the new tool that appears in the scenario and choose Wait from the drop down menu in the Configuration tab. The wait time is specified in milliseconds.
There are two timeout options configurable from the Preferences Panel:
1) Startup Timeout - This option controls how long WebKing will wait for the browser to tell WebKing that it is ready to begin testing. For Internet Explorer this happens when the start URL has been completely loaded (including images). Essentially this is the onload event of the very first page. For Firefox this happens when the document has been downloaded completely (the document may not have completely loaded yet). This is the equivalent of the DOMContentLoaded event for the first page. The default value for this preference is 60 seconds.
2) User Action Timeout - This option controls how long WebKing will wait for a response from the browser that a command has executed successfully. Because of the dynamic nature of web pages, it is possible that the element the command needs to interact with is not present immediately upon page load, therefore changing this value changes how long WebKing will wait for that element to appear and for the command to complete its execution before terminating the test with a failure. The default value for this preference is 12 seconds.
There is an additional Delay Settings option that is configurable for an entire scenario by clicking on the Scenario node in the Test Suite and scrolling to the bottom of the Browser Playback Options tab. The setting can be overridden by individual tests in the Configuration tab of those tests. By deault each test uses the scenario-level settings. Also by default, during recording WebKing sets each test to use either the Request wait time or the UI wait time - the test is set to use Request wait time if the browser makes requests to the server during that test, and the test is set to use UI wait time if the browser makes no requests to the server during that test. Here is more detail about the two Wait Time settings:
1) Request Wait Time - This option helps determine how long WebKing will wait after performing an action before it will move on to the next action. The behavior of this option is as such. After executing a command, WebKing will wait until there is a break in the communication between the browser and the server that lasts at least this amount of time. This break in communication means that all previous requests have received a response, and no new requests are made during that time. When WebKing sees this break, it determines that the page has finished loading, and it moves on to the next action to perform. This mechanism ensures that the browser is ready to execute the next command sent to it by WebKing (for instance, it ensures that the page element that the next action will be performed on appears on the page).
If no such break in communication is ever observed by WebKing, WebKing will wait for a maximum of time equal to the Connection Timeout setting in the Miscellaneous preferences before moving on and attempting the next action.
Making this value too small can cause WebKing to attempt to perform another action in the browser before the browser is ready to process another command. The default value for this option is 4000 milliseconds.
Here are a number of scenarios where you may need to increase the value of this option:
A. You receive a message during playback that says "browserDriver is undefined"
B. During playback, for a particular action you notice that WebKing shows that the test has finished, but the page in the browser has not finished loading.
C. You have a step in your application that takes a very long time for the page to render (sometimes this happens after an initial login). In this scenario often the browser has stopped receiving files from the server, but it is taking some time to process the JavaScript and render the screen.
2) UI Wait Time - This option helps determine how long WebKing will wait after performing an action before it will move on to the next action, much the same as for the Request wait time. However, this wait time is used for a specific test where no request is made by the browser to the server. The intent of this option is to make the amount of time it takes to fill out form fields very quick.
If more time is needed by a single test, than the user can choose to use a Custom wait time and specify how long to wait for only that test.
There is also a Wait command that can be used if the above are insufficient for the needs of your application. To add a Wait command select the scenario you'd like to add it to, and right click. In the wizard that appears select Browser Functional Test. You can then select the new tool that appears in the scenario and choose Wait from the drop down menu in the Configuration tab. The wait time is specified in milliseconds.
0