Adding Transactions
CPTS supports flexible combination of multiple transactions. You can add multiple transactions to a test project.
Prerequisites
A test project has been created. For details on how to create a test project, see Creating a Test Project.
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 Transaction Library.
- On the Transactions tab page, click Add Transaction and set the following parameters:
- Transaction Name: name of a customized transaction.
- Type: Normal transaction refers to transactions of performance tests in normal scenarios, including API tests of applications built based on HTTP/HTTPS/TCP/UDP protocols. Multiple transaction requests can be connected with each other.Note
A maximum of 40 requests can be added to a normal transaction.
- Click OK.
- Add requests to the transaction and click OK.
When the transaction type is Normal, you can add four types of request compositions: packet, think time, response extraction, and checkpoint. Packet is mandatory.
- Packet: data blocks transmitted between HTTP-based applications. For details, see Adding Request Information (Packet).
- Think Time: time interval between two actions. For details, see Adding Request Information (Think Time).
- Response Extraction: If multiple packets exist in a same transaction, use regular expressions to extract the output of the previous packet for the input of the next packet. For details, see Adding Request Information (Response Extraction).
- Checkpoint: used to verify if contents returned by servers are correct through customized verification information. For details, see Adding Request Information (Checkpoint).
- (Optional) A transaction contains one or more requests. If your transaction contains multiple requests, click Add Request to add a request again.
- After a transaction is created, you can modify, delete, and copy the transaction.
- Modify the transaction name: On the Transactions tab page, click Rename next to the transaction to be modified, modify the transaction name, and click OK.
- Delete the transaction: On the Transactions tab page, click More > Delete next to the transaction to be deleted and delete it as prompted.Note
A transaction used by a test cannot be deleted.
- Copy the transaction: On the Transactions tab page, click More > Copy next to the transaction to be copied, and click OK.
Parent topic: Transaction Management
- Prerequisites
- Procedure