Updated on 2024-10-11 GMT+08:00

Generating a UUID

Function Name

$uuid()

Function Description

Generates a random string.

Application Scenarios

The UUID generation function can be used in the following scenarios for API automation:

  • Request URL
  • Request header
  • Request body
  • Checkpoint property
  • if condition
  • for loop interrupt condition

Example

  • Request URL

    As shown in the following figure, the value of test in the request URL is the UUID generation function.

  • Request header

    As shown in the following figure, the value of time in the request header is the UUID generation function.

  • Request body

    As shown in the following figure, the request body uses the UUID generation function.

  • Checkpoint property

    As shown in the following figure, the target value of the checkpoint property result is the UUID generation function.

  • if condition

    As shown in the following figure, the target value of the if condition is the UUID generation function.

  • for loop interrupt condition

    As shown in the following figure, the target value of the for loop interrupt condition is the UUID generation function.