How do I change "Compiler Constants" in the middle of a SilkTest TestPlan?
A Compiler Constant can be set under the "Options/Runtime/Compiler Constant" dialog box within SilkTest. They are automatically evaluated and their values replaced at runtime. Unfortunately these cannot be changed from within a script and need to be set up before a script is invoked.
The best way to change these is to set up all the required constants and save them as an "options set" under "Options/Save New Optionset". This can then be loaded when required in a TestPlan using the "optionset:" keyword. e.g.
[-] test2 [ ] optionset: c:\opt1.opt [ ] script: C:\test1.t [ ] testcase: Test1 [-] test1 [ ] optionset: c:\opt2.opt [ ] script: C:\test1.t [ ] testcase: Test1