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

Adding Request Information (Think Time)

To better simulate user behavior, insert a waiting time between different operations. For example, when a user receives data from the server, the user may wait several seconds before viewing data and providing responses. This period of time is called think time.

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 Think Time tab page, set the basic information by referring to Table 1.

    Table 1 Think time parameters

    Parameter

    Description

    Enable Think Time

    After think time is enabled, you may wait for several seconds before viewing the data received from the server, and then respond.

    Duration (ms)

    Think time refers to the waiting time between two consecutive operations of a user, such as the interval between login and search.

    For example, the response time for each case execution is 0.5s.

    • To execute two case requests per second, do not add a case request whose type is think time.
    • To execute only one case request per second, set Duration to 1s. If the think time is set to 1s and the response time is longer than 1s, the think time will not take effect, and pressure test requests are sent according to the response time.

  6. When the configuration is complete, click Save.