Page tree

Skip to end of metadata
Go to start of metadata

This topic explains how to apply and configure the Search tool in SOAtest and Virtualize. This tool searches text for user-defined keywords. It can be configured to detect either the presence of unwanted terms or the absence of expected terms.This tool requires a validate license.

Sections include:

Understanding Search

The Search tool searches text for user-defined keywords and reports failures if the specified keywords are present or absent (depending on the tool settings). It is useful if you want to be notified of either the presence of unwanted terms or the absence of expected terms.

Since the purpose of the tool is to search for the presence or absence of user-defined keywords, you must customize it before using it to specify a) what term you want to search for and b) whether you want messages reported if the term is absent or present.

Customizing Search

The Search tool is highly-customizable to allow precise searches. You can add keywords, remove key-words, or clear the list of keywords. Additionally, you can specify whether the presence or absence of the keyword should be reported, and what message is reported if the specified pattern is detected. You can also control whether searches use regular expressions or whether searches are case sensitive.

You can customize the following options

  • Search Terms: Specifies the terms that the tool searches for.
    • To add a search term, type it in the New Search Term field, then click Add.
      • When the Search tool searches HTML and XML pages, it does not parse the code; consequently, if you are looking for a string that is broken up by markup tags, you must include those tags in your search keyword.
    • To remove selected search terms, select the terms in the Search Terms list, then click Remove.
    • To remove all search terms, click Clear.
    • To import search terms, click Import. You will be able to import multiple messages/terms from a CSV file.
    • To export search terms, click Export. All terms will be exported to a file in the same format.
  • Custom Output Message: Specifies the message that displays in the Quality Tasks view when a failure is found. When using a search tool in the context of a project , you can parameterize the messages that the search tool outputs if a search term is found (or not found, depending on the settings). This allows you to use a list of output messages from a data source, which is not possible any other way.

    • Two special wildcards are allowed in messages. The wildcards will be replaced with the appropriate values:

      • %0 will be replaced by the keyword that was or was not found. In regular expression mode, this will be the actual string on the page that matched the regular expression.

      • %1: will be replaced with the regular expression pattern that was being used to search when the search tool is in regular expression mode.

  • Apply current message to all terms: Select to apply the current message to all terms.
  • Treat term as word: Select to treat the entered term as a word.
  • Use Regular Expressions: Determines whether the keywords should be treated as regular expressions or as normal text.
  • Ignore Case: Determines whether to ignore case while matching keywords.
  • Display Message if Search Term: Select Found to specify that the message should display if a search term is found (use this to detect the presence of unwanted terms). Select Not Found to specify that the message should display if a search term is not found (use this to detect the absence of expected terms).
  • No labels