Friday, January 5, 2007

Advanced Topics-Silk Test

Advanced Topics
symbols : Calling functions : optionset : Global Variables : Referencing Scripts
symbols
Symbols are used as variables within SilkOrganizer. If you are passing the same argument to a number of different testcases, you can define a symbol and pass the symbol multiple times. Symbols are like variables in SilkTest.
Calling Functions
You can call functions from SilkOrganizer. Just specify testcase: functionname. You can even call a main () from Organizer.
optionset
You can specify an optionset in SilkOrganizer. This will allow you to test using different browsers, different test frames, and any other setting saved with an optionset file. Just specify optionset: config.opt where config.opt is the name of the optionset file to use.
Passing Global Variables
You can pass variables declared in a frame or script from SilkOrganizer to a reusable testcase. Just specify testdata: lsData, where lsData is a global variable declared. In the image above, you can see several global variables which are being passed from the plan.
Referencing Scripts
Normally, the script statement will reference a file which is stored in a specific directory.
For example, script: "c:\silk\ver190\scripts\preferences.t"
By organizing your scripts and plans into sibling directories, you can reference the script using the following syntax:
script: "..\scripts\preferences.t"
This will make the testplan more portable between machines. In the image above, you can see this feature being utilized.

No comments: