Forum Discussion
- AlexKarasChampion Level 3Hi Lane,
Considering the fact that TC utilizes standard VBScript library provided by the OS, I think that everything applicable for VBScript is relevant for TC as well.
Besides that, several times I've met with the situation when undeclared variable (quite often it was just a typo of the real variable intended to be used) was used in the script code and some time was spent for debugging to figure out why the variable is empty but do not contain expected value. Considering that test code is quite rarely requires 'near real-time performance', my opinion is that explicit declaration of the variable is preferred coding practice. - vthomeschoolmomSuper ContributorDuh. I feel a touch dumb now. Of course it uses Windows scripting engine. Thanks. You rock.
- siriusdg_1New ContributorHi... I am doing some troubleshooting on a test that has recorded code and a few custom vbs libs. I am having trouble and would like to make sure I have the basics covered, which means I would like to apply OPTION EXPLICIT to the entire test, including all project variables, test variables, and script and called function variables. In VBS, this is simple... you just type Option Explicit at the top of the main file. But I can't find any way to do this in TestComplete. Am I missing something? Any help very greatly appreciated....
Thanx!
David - AlexKarasChampion Level 3Hi David,
Likewise in TestComplete - you must open every script unit of the project and add Option Explicit as the first line after 'Useunit xxx' lines (if any).
Related Content
- 3 years ago
- 5 years ago
Recent Discussions
- 20 hours ago
- 7 days ago
- 10 days ago