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

Obtaining the Current Timestamp

Function Name

$timestamp()

Function Description

Obtains the total number of milliseconds from 1970-01-01 00:00:00 to the current time.

Application Scenarios

The function for obtaining the current timestamp 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 function for generating the current timestamp.

  • Request header

    As shown in the following figure, the value of time in the request header is the function for generating the current timestamp.

  • Request body

    As shown in the following figure, the request body uses the function for generating the current timestamp.

  • Checkpoint property

    As shown in the following figure, the target value of the checkpoint property result is the function for generating the current timestamp.

  • if condition

    As shown in the following figure, the target value of the if condition is the function for generating the current timestamp.

  • for loop interrupt condition

    As shown in the following figure, the target value of the for loop interrupt condition is the function for generating the current timestamp.