Script Structure Sample

The following example illustrates the basic structure and syntax of a Silk Performer load testing script.

Examples

@codepage(1252)

benchmark Sample
use "Kernel.bdh"

dll "kernel32.dll"
  
"WaitForSingleObject"
    function WaitForSingleObject(in number,
																																	in number): number;

const
  NUMBER_CONST  := 1;
  STRING_CONST  := "ABCD";
  BOOLEAN_CONST := true;

var
  nNumber  : number;
  sString  : string;
  bBoolean : boolean;

dclparam
  nNumParam    : number;
  sStringParam : string;
  bBoolParam   : boolean;

dclrand
  rNumber: RndUniN(1..6);

dclfunc
  function Function1
  begin
  end Function1;

dclevent
  handler ErrorHandler <EVENT_RAISE_ERROR>
  begin
  end ErrorHandler;

dcluser
  user
    User1
  transactions
    TMain : 1;

dcltrans
  transaction TMain
  begin
  end TMain;

dclform
  Form1:
    "elem1" := "Value1",
    "elem2" := "Value2";