For some time now, Dynatrace has enabled you to add content validations to specific clickpath actions. Now this functionality is available for availability web checks, too. When creating or editing an availability web check you now have the option of adding content validation rules.
To create an availability web check with content validation:
- Select Availability & SLA from the Dynatrace menu.
- Click Add web check.
- Type in the URL to be monitored.
- Name the web check.
- Click Create availability web check.
- Click the Add custom content validation button.
- Select Pass if from the first menu to verify that specific content appears on the page, or select Fail if to verify that specific content does not appear on the page.
- From the second menu:
- Select contains text to validate that a specific text string (i.e., the string typed into the Specify text field) appears on the page.
- Select contains text in element to verify display of a text string within a specific page element (window, input field, button label, etc) identified by CSS and DOM Locators on the page.
- Select contains element to verify display of a specific page element (window, input field, button label, etc) identified by CSS and DOM Locators on the page.
- Select contains text to validate that a specific text string (i.e., the string typed into the Specify text field) appears on the page.
- Click Add validation rule to create and enable the rule.
A web check is considered a Failure when any validation rule is not met.
Order of operations
You can create multiple content validation rules to increase monitoring coverage for your application. Each rule is prioritized based on its position in the Validation rule table. In the below example, the Validate that website content contains “Dynatrace Homepage” rule will run first. Subsequent rules will be validated in descending order down the list.