web_global_verification

web_global_verification

The built-in LoadRunner function web_global_verification is used to define a global text check to confirm the presence of a particular text or text string in the following web pages.

  • This function assists in determining whether a specific text or text string is present on the returned response (web page).
  • You can perform a global search on a text or text string by defining the text or by the text’s limits.
  • In the same function, you cannot specify both text and a prefix-suffix pair.
  • Both programs based on URLs and HTML can use this function.
  • While the web_reg_find function only registers a request for the next action function, the web_global_verification function is used worldwide to check the provided text string on all subsequent (web page) request functions.
  • Multiple web_global_verification functions may be added to a script as long as all requests must pass the content check.
  • The web_global_verification_pause, and,web_global_verification_resume functions can be used to pause and resume the global content check, respectively.

Why is the function name so specific?

Web protocol (referred to as “web” in this sentence) uses the web_global_verification function. In the answer of the web pages returned by all subsequent requests in the script, or worldwide (denoted by ‘global’), this function searches for and verifies (expressed by ‘verification’) a text or text string. This is why it is called “web_global_verification.”

How can the LoadRunner script’s web_global_verification function be added?

In order for the check to be applied to all web pages, it is advised to add the web_global_verification function at the start of the script under the vuser_init or Action section. To add the function, follow these instructions:

  1. Place the cursor in the desired location for the web_global_verification function.
  2. To open the Steps Toolbox, go to the menu and choose View -> Steps Toolbox (or press Ctrl+Alt+B).
  3. Type ‘web_global_verification’ into the Steps Toolbox.
  4. You can see the ‘web_global_verification’ function in the search result. On it, click twice.
  5. Fill out the ‘Global text locate’ input box with the value. For information on the inputs, you must enter in the input box, see the attribute portion of this post below.
  6. Click ‘OK’ six times.
web_global_verification input box

                  Figure(1)

Features of “web_global_verification”:

The “Global text find” offers two search possibilities. Depending on whether your search text is a Text String or a Text Boundary, you can select one of them.

a. Search for a specific text string: This option allows you to search for a specific text string. For instance, “User Name,” “Company Name,” etc. Using text flags, such as match case, binary data, use # for any digit, use a wildcard, etc., you can further tailor your search.

b. Search for Text by Start and End of String: Use this option when you know what strings will come before and after the string but not the exact string itself. For instance, a message can be seen on each page of an application. “You are logged in with XYZ ID.” is the message, where XYZ is a user ID. You can include the web_global_verification method with the string “You are logged in with” and the text “ID.” to verify this message on each page of the application.

Hence “You are logged in with ” would be the Start String, and “ID.” would be the End String.

Using text flags, such as match case, binary data, use # for any digit, use a wildcard, etc., you can further tailor your search.

c. Search in This optional attribute’s default value is “No resource.” where to look for the delimited data within the search’s scope. Possible values include:

  • All: The body, headers, and resources make up the search’s coverage area.
  • It says to only conduct searches in the headers.
  • Headers aren’t included in the search; just the body is

There is simply the HTML body in scope; there is no header or other resource.

d. Fail If: “Found” is the default value for this optional attribute. It offers the NotFound and Found choices. You can select whichever solution best suits your needs.

  • The error message “Not Found” is displayed when the text cannot be located. If the Web request is successful, you use NotFound when looking for the text you anticipate finding. For instance, the page’s title, your order number, etc.
  • When the text is found, the word found denotes that the check failed. As an illustration, try searching for “500/Internal Server Error” or just “Error,” etc.

e. ID: The web_global_verification function’s unique identifier. When more than one web_gloal_verification function is used in the script, this ID attribute aids in pausing and resuming the function.

Note: Use web_global_verification_pause to pause the global check and web_global_verification_resume to resume it. Use web_global_verification_pause and web_global_verification_resume for each global check you want to pause and restart.

Example of web_global_verification
Scroll to Top