Forum Discussion

kingsmartbear's avatar
kingsmartbear
Contributor
13 years ago

VBScript engine defect?

Hi All:



   Please run following simple VBScripts in two modes, you will find a big difference between them.



   1. Dos mode in your desktop - Create a .VBS file and name it whatever name you like to contains VBScript code below, then run it you will get result like attached file 1.




'Sub VBScriptTest

dim a, b, c

a = "This is a common text."

c = "This string contains double quote ""Test"""

b="a = c " + VbCrLf 

executeglobal b

msgbox(a)

'End Sub




   2. TestComplete mode in your testing tool - Create a VBScript file and name it whatever name you like to contains VBScript below, then run it you will get result like attached file 2.




Sub VBScriptTest

dim a, b, c

a = "This is a common text."

c = "This string contains double quote ""Test"""

b="a = c " + VbCrLf 

executeglobal b

msgbox(a)

End Sub








    My questions are:



      1. Does it only happen in my testing environment (Windows XP SP3)?



      2. Which version of VBScript engine built-in to TestComplete.



      3. How does SmartBear to test TestComplete (Functional and Regression)?



Thanks,



Allan 


1 Reply


  • Hi Allan,





    1. Does it only happen in my testing environment (Windows XP SP3)?


    This happens because a, b and c in the second case are local. Place the 'dim a, b, c' line outside the procedure to declare them as global.





    2. Which version of VBScript engine built-in to TestComplete.


    TestComplete uses the VBScript scripting engine version present in the operating system.





    3. How does SmartBear to test TestComplete (Functional and Regression)?


    Refer to the Functional Testing With TestComplete and Regression Testing help topics.