Sign in to follow this  
Followers 0
ttulinsky

How Is Autoit Superior To Vbscript For Testing?

10 posts in this topic

I am considering a scripting language to automate regression testing a Windows app.

Would like to know how AutoIt is superior to VBScript.

Also would like comments on suitability of AutoIt for automated testing.

t t la.ca.us

Share this post


Link to post
Share on other sites



VBScript has almost nothing reliable to offer for automation, unless you use something like AutoItX to make it into something.

Then AutoIt is something much better again.

I can only say, try AutoIt out for yourself. If any language will do it, then AutoIt can. AutoIt was made for automation, where as VBScript was not.

The helpfile will show you...

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I am considering a scripting language to automate regression testing a Windows app.

Would like to know how AutoIt is superior to VBScript.

Also would like comments on suitability of AutoIt for automated testing.

t t la.ca.us

I'm currently using autoit for testing.

I can tell you that there is nothing you can't do and no matter how hard your tests will be you can do it with autoit , just make sure that you use this form when needed.

My test scripts almost used every single feature of autoit and so far I never saw an issue, they run for weeks on multiple computers.

And above all that:

The time you need make any script with any other language will take half or less that time using Autoit :)

It’s simple, easy to read and you will learn it by just a few examples.

Don’t forget, this form is amazing; just make sure that you will not ask an old question.

Good luck.

RK

Edited by rbhkamal

"When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix

Share this post


Link to post
Share on other sites

VBScript has almost nothing reliable to offer for automation, unless you use something like AutoItX to make it into something.

can you please give me a few examples? I am not very familiar with VBScript. Mgmt is likely to favor it unless I give concrete reasons it is inferior.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I am considering a scripting language to automate regression testing a Windows app.

Would like to know how AutoIt is superior to VBScript.

Also would like comments on suitability of AutoIt for automated testing.

ALL (& more) you can do in wsh you can do it (better) with Autoit beta

For example you can call WScript.Shell with ObjCreate :

$o_SW = ObjCreate("WScript.Shell")
$o_SW.run("c:\test.txt")

$o_SW = ObjCreate("WScript.Shell")
;Set oShell = WScript.CreateObject("WScript.Shell")
$r = $o_SW.RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\ProgramFilesDir")
MsgBox(262144, "", $r)

#cs
$o_SW = ObjCreate("WScript.Shell")
$o_SW.run("C:\WINDOWS\EXPLORER.EXE ::"& _
"{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::"& _
"{992CFFA0-F557-101A-88EC-00DD010CCC48}"),3
#ce
Edited by Lapo

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

sorry, consider me really dumb.

I can see you are reading the registry and displaying a value, but do not understand the part that starts Explorer. What is it doing and why can it be done with vbScript?

ALL (& more) you can do in wsh you can do it (better) with Autoit beta

For example you can call WScript.Shell with ObjCreate :

$o_SW = ObjCreate("WScript.Shell")
$o_SW.run("c:\test.txt")

$o_SW = ObjCreate("WScript.Shell")
;Set oShell = WScript.CreateObject("WScript.Shell")
$r = $o_SW.RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\ProgramFilesDir")
MsgBox(262144, "", $r)

#cs
$o_SW = ObjCreate("WScript.Shell")
$o_SW.run("C:\WINDOWS\EXPLORER.EXE ::"& _
"{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::"& _
"{992CFFA0-F557-101A-88EC-00DD010CCC48}"),3
#ce
Edited by ttulinsky

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

What is it doing and why can it be done with vbScript?

Just a generic sample with autoit's ObjCreate .. it opens remote dial up folder

try this in an autoit file (*.au3)

$o_SW = ObjCreate("WScript.Shell")
$o_SW.run("C:\WINDOWS\EXPLORER.EXE ::"& _
"{20D04FE0-3AEA-1069-A2D8-08002B30309D}"),3
oÝ÷ ÚÈhºWh¥éÌÈ*&¦ë^®«¨µú%uêêºfk¦7¢»aÇ(Úè§zV®¶­s`¢b33c¶õõ5rÒö&¤7&VFRgV÷Cµu67&Bå6VÆÂgV÷C²¢b33c¶õõ5rç'VâgV÷C´3¢b3#µtäDõu2b3#´UÄõ$U"äUR£¢gV÷C²fײð¢gV÷C·³#CDdSÓ4TÓcÔ$CÓ$#33GÒb3#³£¢gV÷C²fײð¢gV÷C·³#T3##Ó4TÓcÔ$DBÓ$#33GÒgV÷C²

same sample in "pure" VBS

Set oShell = WScript.CreateObject("WScript.Shell")
oShell.Run "explorer.exe /n,::"& _
"{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::"& _
"{21EC2020-3AEA-1069-A2DD-08002B30309D}"
Edited by Lapo

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

sorry, consider me really dumb.

I can see you are reading the registry and displaying a value, but do not understand the part that starts Explorer. What is it doing and why can it be done with vbScript?

Actually, that example is using VBScript. The script is AutoIt code which creates an instance of VBScript's COM object. It then uses VBScript to read the registry, start explorer, et cetera.

I think the point trying to be made with that example was, AutoIt is superior to VBScript because not only can AutoIt do pretty much everything VBScript can natively (All the things in that example can be done in AutoIt without calling out to VBScript), it can also be used to instantiate VBScript, too.

Edited by Valik

Share this post


Link to post
Share on other sites

Have you heard of Mercury's Quick Test Pro software? My company uses it to test their mission critical applications because it is an Industry standard.

But for everything else I use AutoIT to test with.

I have yet to find anything that Quick Test Pro can do that AutoIT can't.

As for why is AutoIT better than VBScript... because AutoIT has built in functions to assist you with Automating button clicks and interact with Windows and they are simple and very easy to learn. If the built in AutoIT functions can't do what you need then you can use the Beta AutoIT version and have access to everything you can do in VBScript.

Mike


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0