Adding new Content-Based view rules

Instructions and examples of adding rules to define the site's logical structure.

Before you begin

In Content-Based view of the Scan Configuration dialog box (Explore > Content-Based), you can define content-based structure using two types of definition:
  • Logical Content Path (such as breadcrumbs)
  • Custom (use regexps to define your own custom nodes)

Doing this enables AppScan® to display a logical application tree, instead of listing large parts of the site under a single node. When more than one rule is defined, AppScan attempts to match each URL to the rules in the order they are listed. As soon as it finds a match it includes the URL in the Content-Based tree following that rule and proceeds to the next URL.

Procedure

  1. Add new definitions by clicking the plus button (or edit existing definitions by selecting a definition and clicking the edit button). Refer to the table below for field descriptions.
    Setting Description
    Name Name for this rule.
    Description (Optional) Description for this rule.
    Rule Type Select Logical Content Path or Custom. The remaining fields vary depending on your selection.
    Logical Content Path
    Content Path Regexp that matches the content path in the HTML.
    Separator Regexp that matches the hierarchy separators in the content path in the HTML.
    Node Display Name Regexp that matches the node names (that appear to the application user and that will be used in the Application Tree).
    Condition (Optional) Regexp that defines the responses that are to be included in this node location.
    Custom
    Node Location Use standard URL format to describe where nodes that fulfil the condition for this rule should be placed in the application tree (for example: /Home/Buy/Books). If the path does not exist it will be created.
    Condition Regexp that defines the responses that are to be included in this node location. If the page content matches this condition it will be included in the Content-Based tree.
    Note: Fields that require or accept a regular expression have the Expression Test button:, which opens the Expression Test PowerTool, to help you verify the syntax of the regular expression.

    If you need additional help you may find the following link useful: http://www.regular-expressions.info/quickstart.html

  2. Use the up/down arrows to arrange the definitions in the order they are to be applied.
  3. Verify that the check box next to each rule that is to be applied, is selected.
  4. Click OK to save changes.

Example

The following tables shows sample content for the two rule types.
Table 1. Content-Based View rule
Setting Sample Meaning
Content Path <title>(.*?)</title> All text between the title tags will be used as the basis for the node names.
Separator [:\->|] These five characters will be treated as separators. Therefore:

<title>Home:Accounts</title>

and

<title>Home:Plans</title>

will appear in the application tree as a parent node Home with two child nodes: Accounts and Plans

Node Display Name ^\s*(.*?)\s*$ Spaces before and after the text will be removed when naming the node.
Condition Log out Only pages containing the words "Log out" will be included in the application tree under this rule.
Table 2. Custom rule
Setting Sample Meaning
Node Location /root/child/grandchild All pages that fulfil the Condition are added to the application tree under /root/child/grandchild
Note: If the parent nodes in the specified branch do not exist, they will be created.
Condition As this field is empty, all content to which the rule is applied will be added at this node location. Therefore, if this rule appears after the rule above, all pages that do not contain the words "Log out" will be added under the node /root/child/grandchild