Adding Request Information (Think Time)
To better simulate user behavior, it is necessary to simulate the waiting time between different operations. For example, when a user receives data from a server, the user may wait for several seconds to view the data before responding. This delay is called Think Time.
Procedure
- Log in to the CPTS console and choose CPTS Test Projects in the navigation pane on the left.
- Locate a CPTS test project to be edited and click Edit Test Task.
- On the Test Tasks tab page, expand a task, expand the test case to which you want to add request information, and click Add Request.
- Select Think Time for Request Composition and configure the other parameters by referring to Table 1.
Table 1 Think Time parameters Parameter
Description
Enable Think Time
After enabling the think time, you may wait for several seconds to view 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 running of a case is 0.5s.
- To execute two case requests per second, do not add a case request in the type of Think Time.
- To execute only one case request per second, change the Duration to 1s. If the Duration 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.
NOTE:Variables can be inserted. Restrictions on variables are as follows:
- Type is set to Enumerated.
- Only one value (a numeric string) is allowed in each variable.
- The value range is determined by the variable restrictions in the text box.
- When the configuration is complete, click OK.
Parent topic: CPTS Test Task Management
- Procedure