You use transactions to name and measure an arbitrary set of operations. This topic explains why you may need to specify an arbitrary set of operations as a transaction, and describes how to create user-defined transactions.
About User-Defined Transactions
Sometimes, organizing operations by scenarios, pages, connections or groups is not enough to represent certain business or technical task: adding an order, checking balance, retrieving stylesheets, obtaining data and so on. For this purpose, you can define custom transactions - an arbitrary sequence of operations that perform some specific task. Once you define a transaction, LoadComplete will start collecting performance metrics for it: completion time, transactions simulated with errors, and so on.
You can define a transaction at design time in the Scenario editor:
Each scenario can include multiple transactions. Transactions may overlap or contain one another.
If the beginning and the end of a transaction belong to different connections, the number of operations executed during the transaction, as well as their order, may vary. The operations of parallel connections work concurrently and can be faster or slower than the operations of other connections, thus some operations can be included in or excluded from the transaction.
Add the Transaction operation before the first operation that corresponds to the desired task. You can insert the Transaction operation either before the needed Page operation or before the needed operation under the Connection node.
Add the End of Transaction operation after the last operation that corresponds to the desired task.
Select File > Save from the LoadComplete main menu to save the changes.
The matching pairs of the Transaction and End of Transaction operations must be in the same scenario. You can use these operations in complex scenarios, but you cannot place the Transaction operation in one subscenario and the matching End of Transaction operation in another subscenario.
To distinguish transactions easier, you can name them. Select the needed Transaction operation, press F2, type the needed name and press Enter. Note that LoadComplete will rename the matching End of Transaction operation automatically:
For each transaction, you can set the maximum acceptable duration, in milliseconds. To do that, enter the needed value in the SLA text box of the transaction. During the test run, if the transaction completion time exceeds the specified value, LoadComplete will report an error.
You cannot run transactions separately. You can run them only as part of a scenario. During the test run, you can view the transaction execution progress on the Runtime > Graphs page:
If the maximum acceptable execution time is specified for your transactions, you can also monitor whether the transaction completion time exceeds the specified value:
View Transaction Results
If a test includes scenarios with user-defined transactions, LoadComplete will report the transaction results. The respective metrics will be displayed in the Report panel of the test log:
If the simulated scenarios include multiple transactions, LoadComplete will report both the metrics of each transaction and combined metrics.
The duration of each transaction will be displayed as additional information of the respective End of Transaction operation in the Details panel of the test log:
90th, 95th, 98th, 99th percentile completion time – The completion time value that covers 90%, 95%, 98% and 99% of the transactions respectively.
Standard deviation – The standard deviation of the transaction completion time values.