automation - How to use callback function in SilkTest's 4Test language -


so i'm trying use ancient 4test language in silktest in modern manner. have several similar tests differ in part of code. create infrastructure function boilerplate stuff , call different functions different tests. callback function let's say.

so that:

testcase a(function f)     stuff     f()     other stuff 

has done this? how should it?

so have found solution , i'm posting here documentation reasons.

when person wants pass function argument, have pass name of function string, , call following structure

@(functionnamestring)() 

so code like

void somefunction()     print("hello world!")  @("somefunction")() 

this works methods of objects.


Comments