Updated on 2024-06-06 GMT+08:00

Adding Request Information (Checkpoint)

Checkpoint uses customized verification information to check whether the content returned by a server is correct. For different protocol types, the checkpoint supports different contents. The HTTP and HTTPS protocols support the verification of response code, header, and content. The TCP, UDP, MQTT, and WebSocket protocols support only content verification.

Procedure

  1. Log in to the CodeArts PerfTest console and choose PerfTest Projects in the left navigation pane.
  2. Click the name of the desired PerfTest project to go to the details page.
  3. On the Cases tab, select the desired test case in the case list on the left.
  4. On the Case Script tab page, select a case, and click Add Request.
  5. On the Checkpoint tab page, set the basic information by referring to Table 1.

    Table 1 Checkpoint parameters

    Parameter

    Description

    Enable Result Checkpoint

    After this option is enabled, you can check whether the content returned by a server is correct through customized verification information.

    Retry Times

    Number of times to retry a failed request until it succeeds. The value ranges from 0 to 100.

    NOTE:

    Statistics such as response time, RPS, and success rate of retried requests are not included in the report. The report counts only the last data.

    Retry Interval

    Interval for retrying a failed request. The unit is ms. The value ranges from 0 to 3,600,000, that is, the maximum interval is 1 hour.

    Response Code

    Set this parameter only when the protocol type is set to HTTP or HTTPS on the Packet tab page.

    This parameter is the HTTP or HTTPS response status codes, including 1XX, 2XX, 3XX, 4XX, and 5XX, carried in a packet.

    Header

    Set this parameter only when the protocol type is set to HTTP or HTTPS on the Packet tab page.

    Headers of HTTP and HTTPS.

    1. Click Add Header.
    2. Enter a Header Name. For details, see Header Description.
    3. Set check conditions.
    4. Set contents.

    Response Content

    Body parts of HTTP, HTTPS, TCP, UDP, MQTT, and WebSocket, namely the load parts of the requests and responses.

    1. Click Add Content.
    2. Set check conditions.

    Condition Rule

    • AND: The verification is successful only when all the check conditions are met.
    • OR: The verification is successful when any check condition is met.

  6. When the configuration is complete, click Save.