Download Replay a Testcase
Transcript
The page refresh processor uses an extractor to extract the duration the user should wait before refreshing the page. If no refresh is specified, the loop is considered complete, and the user will continue on through the next page. If a refresh is found, the user will wait for amount of time instructed, and then refresh the page. The extractor is configured in the same way as other extractors, except that the result must be the refresh delay, instead of an arbitrary string to be used by other modifiers. The Virtual User will perform a loop on the page as long as refresh delays are located in the returned page content. When a page refresh is detected, the behavior of the refresh may be customized by using the remaining options: l Extracted value is measured in: configures in which unit the numerical delay should be interpreted when using a custom extractor. l Continue downloading resources during refresh delay: if this option is enabled, the virtual user will continue to download remaining transactions in the page (such as images) even after a page refresh has been requested. l Reload completed resources on each refresh: if this option is enabled, when virtual user refreshes the page, all previously downloaded resources on that page will be re-downloaded. Additionally, any active and incomplete resources will be cancelled when after the page delay expires and the page must be reloaded. The default extractor used by the page refresh processor looks for META tags in the format above. If the URL returns refresh directives in a different format, then the "Use custom refresh time extractor" may be used to customize the extractor, and allow it to correctly extract the page refresh time. Once the page refresh processor has been created on the last page in the URL chain, the prior URLs in the chain will need to be removed. Since the processor will loop over the transaction it has been configured on, immediately preceding transactions with the same URL (those which contain the refresh directive), will now be processed by the page refresh processor loop, and those preceding transactions should be removed from the testcase. Cookie Processors A cookie processor will create or delete a single cookie, possibly overwriting a cookie with the same name that already exists. Normally, explicit cookie handling is not needed because cookies are most often embedded in HTTP headers, where they are handled automatically between the server and the browser. When deciding whether or not to submit a cookie to a server, Load Tester is aware of the following cookie components, which are described in the relevant RFCs: name, value, path, domain, expires, and secure. Sometimes a cookie is set or deleted using javascript, and a Cookie Processor can be used to replicate this behavior. A cookie may be constructed by the following methods: l Create a Cookie: This will create a cookie given a name, value, and/or other cookie metadata. Only a name is required. l Delete a Cookie: This will delete a cookie given a name and optionally other cookie metadata. Only a name is required. l Freeform Cookie: If you use this method, some care must be taken to assemble a valid "Set-Cookie:" line. Under this method, It is also possible to use a regular expression extractor to capture name/value pairs into separate capture groups within a single regular expression.