All Products
Search
Document Center

Performance Testing:Check point (assertion)

Last Updated:Dec 18, 2024

In actual stress testing scenarios, check points help you check whether requests are successful from the business perspective. This topic describes how to configure check points.

Check points

You can configure check points to check whether requests are successful from the business perspective. The following check point types are supported: Status Code, Response Header, Response Body, and Output Parameters. After you configure check points, the real-time stress testing and the stress testing reports indicate whether the tested business runs as expected or failed. You can determine whether to continue the stress test based on the reports.

image

Take note of the following items:

  • The logical relationship between multiple check points is AND.

  • If the value of the Content parameter is not an all-digit string, the following check conditions are supported: Equal To, Not Equal To, Contain, Not Contain, Belong To, Not Belong To, Exist, Not Exist, and Regular Expression.

  • If the value of the Content parameter contains only digits, the following check conditions are supported: Greater Than, Greater Than or Equal To, Equal To, Less Than or Equal To, Less Than, Belong To, Not Belong To, Exist, Not Exist, and Regular Expression.

  • The Exist and Not Exist check conditions apply to all data types. The check conditions only check whether a check object exists.

  • The Belong To and Not Belong To check conditions support positive and negative integers, 0, and strings.

  • If you specify a numeric expression in the Content field, make sure that the expression complies with standard mathematical expression conventions. Examples:

    • A closed interval: [-20,20].

    • A set: {[-200,200],-1,2}.

    Note

    If a set does not include a negative integer, you can specify the set in the format of a closed-interval expression. However, we recommend that you use a set expression. For example, [200-300,1] consists of 1 and all integers in the closed interval from 200 to 300.

String example: {"abc","bcd","200","-200","Registered","Signed Up"}

Check point example

The tested business runs as expected if the stress testing request meets the following requirements:

  • The value of the export_cookie parameter meets expectations. For example, the export_cookie parameter contains sandbox information.

  • The response status code is in the range of 200 to 399.

In the preceding sample scenario, you must configure the export_cookie output parameter and check points. Perform the following steps:

  1. On the Output Parameter Definition tab of the API that corresponds to the sample scenario, configure the export_cookie output parameter, as shown in the following figure.image

  2. On the Check Point (Assertion) tab of the API that corresponds to the sample scenario, configure check points, as shown in the following figure.image