Browser Synthetic Tests¶
Browser Synthetic Tests simulate real browser access to pages. supporting recording of complete user operation paths such as login. clicking. input. waiting for elements. and text assertions. helping you monitor the availability and performance of web applications in real browser environments.
By recording page operations through a browser plugin and generating YAML scripts. or directly uploading YAML files. the system automatically parses them into visual steps. executes them at configured frequencies on specified nodes. and provides detailed execution logs. performance metrics. and failure screenshots. helping you quickly locate page-level failures.
Create¶
Navigate to Create > Browser Synthetic Tests to enter the browser synthetic test rule configuration page.
Step 1: Define Access Page¶
-
URL: Enter the starting access address of the page to be monitored. supporting both
httpandhttpsprotocols. -
Advanced Settings: Expand to configure request settings. certificates. proxy. and privacy options.
-
Privacy: By default. Screenshot on failure and Sensitive information masking are enabled.
- When screenshot is enabled. the system automatically captures the current page screen upon test failure to assist in troubleshooting.
- When masking is enabled. sensitive information in screenshots and logs will be automatically hidden.
-
-
Name: Customize the name of the browser synthetic test rule. Duplicate names are not allowed within the current workspace.
Step 2: Select Test Nodes¶
Select the nodes to execute the synthetic tests. Supports selecting one or multiple nodes in China or overseas regions (available only for Commercial Plan and above users) to simulate real browser access experiences from different geographical locations.
Step 3: Configure Operation Steps¶
Browser Synthetic Tests define page operation steps through YAML scripts. You can import them in the following two ways:
- Browser Plugin Import: Download and install the
browser-dial Recorderplugin. record page operations in the browser. and then import the generated YAML file with one click. - Direct YAML Upload: Drag and drop or click to upload locally written or existing YAML script files.
After uploading. the system automatically parses the script and displays the parsing status. number of steps. and number of variables. Upon successful parsing. the page presents Variable Configuration and Visual Steps. If parsing fails. the page prompts with specific errors and prevents saving.
Variable Configuration¶
Variables are generated by parsing the YAML script. supporting two types: plain text and secret text:
- Plain Text: Can be edited and displayed in plain text.
- Secret Text: Displayed with masking by default. does not support plain text display after saving. If modification is needed. only new values can be re-entered.
Visual Steps¶
Parsed steps are displayed in visual card form. containing information such as step number. operation type. target element. expected value. etc. By default. a maximum of 6 steps are displayed. with excess steps automatically collapsed. click to expand all. Common operation types include: open page. input text. click element. wait for element to appear. assert text. etc.
You can click on a single step to edit its expected value. or switch to YAML mode to view and modify the script content. When switching back from YAML mode to visual mode. changes will be synchronized and updated.
Note
The maximum number of script steps is 100. Exceeding this limit requires deleting extra steps or re-uploading a streamlined script. otherwise the system will prevent saving.
Step 5: Execution Strategy¶
-
Execution Frequency: Select the execution frequency for the synthetic test task. Supports fixed options such as 1 minute. 5 minutes. 15 minutes. 30 minutes. 1 hour. 6 hours. 12 hours. 24 hours. or custom Crontab expressions.
-
Failure Retry: Disabled by default. When enabled. if a test fails due to network timeout. element wait timeout. or assertion failure. the system will automatically retry execution according to the set number of retries (0-3 times) and interval (5-300 seconds).
- If any retry succeeds. the result of this round of testing is recorded as "Retry Success".
- If all retries fail. the result of this round is recorded as "Failure".
Script parsing failure does not trigger retries.
View Test Results¶
Test List¶
After browser synthetic tests are executed. you can view all execution records in the test list. which by default displays the following information:
- Status: Success. Failure. Retry Success. Executing.
- Time: Execution time of this test.
- Rule Name: Name of the browser synthetic test rule. click to enter details.
- URL Address: Starting access page.
- Test Node: Name of the node executing the test.
- Failure Type: Network timeout. element wait timeout. assertion failure. etc.
- Total Duration: Total execution time for this run.
Test Details¶
Click the rule name in the list to enter the details page. The top displays status. execution time. task name. duration. browser type. test node. and URL address. Click ... on the right to expand the dropdown. supporting export of JSON files and viewing rule details.
The details page is divided into three tabs:
1. Execution Details
- Failure Summary: Displayed only when the test fails. summarizing the failure reason.
- Retry Records: If retries were triggered during execution. displays the time and result of each retry. not shown if no retries occurred.
- Execution Steps: Displays the execution result of each step in a table. with a summary at the top showing total steps and counts of success/failure/not executed. Click a step to expand and view details. including operation type. target element. timeout. current page address. failure reason. screenshot. Console errors. and number of resource loading failures.
- Key Metrics: Displays TTFP (Time to First Byte). Loading Time (Page Loading Time). LCP (Largest Contentful Paint). CLS (Cumulative Layout Shift). and Total Duration.
If failure screenshot is enabled in the configuration. you can view the page screenshot at the time of failure in the corresponding step.
Secret text variables in input steps are displayed as masked values in the details. such as ********.
2. Variables
Displays the variables used in this execution and their values. Secret text variables only show masked values.
3. Extended Attributes
Displays all field information for this synthetic test.