This section describes transactions and how frequently they should be run in a test.
Transactions are a set of actions performed by a script. As shown in Basic script structure, a script's transactions are defined in its dcluser section:
dcluser user VUser transactions TInit : begin; TransactionName : 1; TFinish : end;
dcluser section specifies the following:
- Order in which transactions are executed (from top to bottom)
- How frequently transactions are executed
The keywords begin and end can be used in only one transaction per script, and that transaction is executed only once during the simulation. For all transactions that do not contain these keywords, you must specify the execution frequency. For example, in the following code snippet, virtual users execute
Transaction1 3 times before moving to the next transaction,
dcluser user VUser transactions TInit : begin; Transaction1 : *3*; Transaction2 : 1; TFinish : end;
Most situations require each transaction to be executed only once because the workload simulation time regulates the repetition of transactions. The next section, "Setting up workloads," explains how to set up workload simulation time, which determines how long a simulation runs. During the simulation, SilkPerformer runs a script according to the dcluser specification. SilkPerformer repeats the script again and again until the workload simulation time ends.