The Service Map for APM is here!

Browser Check

Synthetics is in beta for the Datadog US Site. Request access via the Datadog Synthetics request form.

Overview

Browser Checks are scenarios executed by Datadog on your web applications. They run at configurable periodic intervals from multiple locations around the world, and from multiple devices. These checks verify both that your applications are up and responding to requests, and that any conditions defined in your scenarios are met.

Configuration

Test details

Define the configuration of your Browser Check.

Browser Check make request
  1. Give your Browser Check a name.
  2. Enter the Start URL. This is the URL from which your Browser Check starts the scenario.
  3. Define Tags with the <KEY>:<VALUE> format to filter on a <VALUE> for a given <KEY> in the Synthetics page.
  4. Define on which device to run your check. Available devices are: Laptop Large, Tablet, and Mobile Small.
  5. Pick-up locations to run the test from. Available locations are:
    • Frankfurt (Request made from an AWS Datacenter)
    • Tokyo (Request made from an AWS Datacenter)
  6. Choose a Check frequency between “1 run per 5 minute interval” to “1 run per week”:

    Check frequency

Notifications

A notification is sent if at least one step of the Browser Check scenario fails. To configure your notifications:

Browser check notification
  1. Select users and/or services to send the notifications to.
  2. Enter a message for the Browser Check. This field allows standard Markdown formatting. Notification messages include the message defined in this section and information about which assertion failed and why.
  3. Click Save Details and Record Test to save your Browser Check.
  4. Start to record your test.

Record test

Tests can be only recorded from Google Chrome. To record your test, download the Datadog Record Test extension for Google Chrome.

Browser check record test
  1. Optionally, select Open in a pop-up at the upper right of the page to open your test recording in a separate pop-up window in order to avoid sizing issues in the displayed window within Datadog’s interface.
  2. Click on Start recording to begin recording your Browser Check.
  3. Your actions are recorded and used to create steps within your Browser Check Scenario.
  4. Use the actions available in the upper left corner to enrich your scenario:

    Browser Check assertions

    Note: Your last browser check step must be an Assertion, otherwise there is nothing to check.

  5. Once you have finished your Scenario, click on Save and Launch Test.

Actions

Assertion

Assertion browser check

Assertions allow you to check if an element, a content, or some text is available in the current page:

Assertion Description
Assert that an element is present on the page Asserts that an element (such as a specific span, div, h, a, etc.) is present on the current page.
Check an element's content Makes sure that a specific element is located or not on the current page.
Assert that some text is present anywhere on the page Asserts that some specific text is present on the current page.
Assert that some text is nowhere on the page Asserts that some specific text is NOT present on the current page.
Check main page URL's content This takes the URL of the current page, and asserts whether a specific value (string, number, regex) is present within it.

The navigation action allow you to:

  • Refresh the current page of the scenario.
  • Follow a specific link.

Hover

This browser check step isn’t added through an actual hovering mechanism (otherwise each element you are hovering would be added as a step) but using a dedicated action with a click.

After selecting the Hover action, click on the element you want to choose to create a new step.

Variable

Define a variable
Setup Variable

To define a variable, enter a capitalized name then choose its type between:

  • Select an element content: this type allows you to create a variable out of a span, div, etc. content by extracting the text of this element.
  • From pattern:
Pattern Description
{{ numeric(n) }} Generates a numeric string with n digits.
{{ alphabetic(n) }} Generates an alphabetic string with n letters.
{{ alphanumeric(n) }} Generates an alphanumeric string with n characters.
Use the variable

Once created, use your variable to set an input text on a form or search bar. Use the little hand on your variable box to create an input step:

Variable Input

You can also use your variables in some assertions, including:

  • Check an element’s content
  • Assert text is present on the page
  • Assert the page does not contain text
  • Check main page URL’s content

To use your variables in one of your assertions, hit Use Variable and select the variable you want to use:

Use variable in assertion

Further Reading