Skip to content

Create HTTP Synthetic Test Task


HTTP Synthetic Test performs periodic availability monitoring for websites, domains, backend interfaces, etc., based on the HTTP protocol. By monitoring sites in real-time, it collects availability statistics, provides test logs and real-time alerts, helping you quickly identify network issues and improve network access quality.

HTTP Synthetic Test allows you to send HTTP requests to your application's API interfaces to verify defined requests and judgment conditions, such as request headers, status codes, response times, etc.

Start Creating

Click Create > API Tests, and select HTTP Protocol.

Step 1: Define Request Format

  1. URL: Supports entering URLs for both HTTP and HTTPS, including four request methods: GET, POST, PUT, and HEAD.
  2. Advanced Settings: Configure advanced settings based on actual needs, including Request Settings, Request Body Content, Certificate, Proxy, and Privacy.
  3. Name: Customize the HTTP Synthetic Test task name. Duplicate names are not allowed within the current workspace.

Advanced Settings

  1. Select HTTP Version:

    • HTTP/1.1: Based on TCP, widest compatibility.
    • HTTP/2: Multiplexing, recommended for mainstream services.
    • HTTP/3: Based on QUIC (UDP), next-generation protocol (❗️Currently, HTTP/3 and proxy configuration cannot be used simultaneously).
  2. Choose whether the current HTTP request should follow redirects during execution.

  3. Define the request header information to be added to the current HTTP request.
  4. Define the Cookie to be added to the HTTP request.
  5. Add HTTP authentication, including username/password.
  1. Select request body type: text/plain, application/json, text/xml, multipart/form-data, None.
  2. Enter the request body content.
  1. Ignore server certificate errors: When checked, the HTTP test will continue to establish the connection even if SSL certificate verification fails.
  2. Upload client certificate, including private key and certificate.
  1. Specify the proxy server address that the HTTP request needs to pass through.
  2. Add HTTP request header information that needs to be included when sending to the proxy server.

Do not save response content: When this option is checked, the response body content will not be saved during runtime, thereby avoiding sensitive data appearing in test results. However, please note that this may increase the difficulty of troubleshooting.

Step 2: Availability Judgment

Default Mode

This mode matches data by adding judgment conditions. Multiple conditions can be combined using "All" or "Any" to achieve AND or OR logical relationships.

After defining the request format and adding judgment conditions, click the "Test" button on the right side of the URL to verify if the synthetic test connection configuration is successful.

Note

The test result is independent of the selected node.

Script Mode

Script mode, by writing Pipeline scripts, enables the following functionalities:

  • Set judgment conditions: Customize complex judgment logic based on business requirements, supporting single or multiple combined condition judgments.
  • Process result data: Perform custom processing on synthetic test results, including data cleaning, format conversion, etc.

Script mode flexibly meets the needs of extracting specific fields from responses or performing complex conditional judgments.

Example:

body = load_json(response["body"])

if body["code"] == 200 {
  result["is_failed"] = false
} else {
  result["is_failed"] = true
  result["error_message"] = body["message"]
}

In the script, load_json is first used to parse the response content into a JSON object, then it checks if the response status code is 200. If code is 200, the result is marked as successful; otherwise, result["is_failed"] is set to true, and result["error_message"] is set to the message from the response content.

For more information, refer to Custom Synthetic Test Tasks.

Step 3: Select Synthetic Test Nodes

Currently, Guance covers 14 synthetic test nodes globally. You can select one or more nodes in China or overseas regions (available only to Commercial Plan and above users) to quickly start monitoring site service quality.

Step 4: Select Synthetic Test Frequency

Select the execution frequency for the synthetic test task. Supported options are:

  • 1 minute (available only to Commercial Plan and above users)
  • 5 minutes (available only to Commercial Plan and above users)
  • 15 minutes (available only to Commercial Plan and above users)
  • 30 minutes
  • 1 hour
  • 6 hours
  • 12 hours
  • 24 hours

In addition to the specific options provided by the system, you can also input a custom crontab task to configure scheduled task execution based on cycles such as minutes, hours, days, months, weeks, etc.

Feedback

Is this page helpful? ×