Updated on 2024-04-25 GMT+08:00

Character String Extraction

Description

When setting checkpoints or response extraction, if the expressions in the property setting bar cannot meet the requirements, you can set Advanced Extraction Type to Character string extraction.

There are two Type Value text boxes for string truncation:

  • The first box indicates the start index. The first digit is 0. The start index is contained in the truncated string.
  • The second box indicates the end index. The end index is not contained in the truncated string.

Example

The following response body is used as an example.

  • To extract the fifth to ninth digits of code in the first element of the result array from the response body and compare them with the target value, configure the Checkpoints tab page as follows.

  • To extract the fifth to ninth digits of code in the first element of the result array in the response body and assign the value to the variable code, configure the Extract Response tab page as follows.