Example Test Method

Any number of member or static methods may be called within a Silk Performer test script. The methods may take any basic or complex parameters and have any return values. The only restriction is that arrays of basic and complex parameters are not supported.

As a member method example, here is the implementation of the doFoo() method:

public void doFoo() throws SilkPerformerException
{
  if (SilkPerformer != null)
    SilkPerformer.Print("Method \"Foo\" entered.");  
  SilkPerformer.MeasureStart("Foo");
  SilkPerformer.MeasureStop("Foo");
}
Note: Any method invoked on the SilkPerformer context object can throw a SilkPerformer exception, for example when the execution of the test is stopped. SilkPerformerException must not be caught by the test code. Exceptions must be thrown on the method caller, which is the Silk Performer runtime.