AutoIt vs QTP

               

有人比较了一下QTP和AutoIt:
http://www.autoitscript.com/forum/index.php?showtopic=66144


AutoIt and QTP are hard to compare but I 'll try since I just recently since about 4-6 weeks know AutoIT and QTP I know for about 2 years.

AutoIt的原本目的不是作为测试工具,但是确实具备自动化测试工具的主要组成部分。
AutoIT was not intended as a testing tool but definitely it has all components available to do automated testing but needs a little more studying.
If AutoIT recognizes your objects (not all are recognized with AU3Info tool but you can recognize more from script. HTML controls are not

recognized by AU3Info but can be controlled from functions as documented in IE.AU3 UDF library)

* QTP is more focused on the userlevel with a friendly userinterface also usable by non programmers. AutoIT is more for the script developer

and not for a tester although an experienced scripter can make life real friendly with GUI support which is contained within AutoIT language
QTP关注用户层,拥有友好的用户界面,即使不怎么懂开发的人也能使用。AutoIt则偏向于由开发者使用(用的是类似VBScript的AutoIt语言)


* QTP has a better spy on windows/objects out of the box. If you scan this forum there are many short scripts which help you out to spy on

other objects. AutoIT can do it but its not fully integrated within AU3Info tool (the spy equivalant of QTP). So easy spying on internet controls is

not easy
QTP的Object Spy要比AutoIt的AU3Info强很多。

* QTP expertview is comparable to the development way how AutoIT works (Installing the full Scite Installation package you have a full IDE)
QTP的专家视图用于脚本编辑,而AutoIt用的是Scite。

* QTP has better support for terminal emulator out of the box although with AutoIT you can build easily your own screenscraper
QTP对于终端模拟器的支持要强些。

* QTP has java support which is not available thru AutoIt (So far not found .au3 scripts that connect with Java Native Interface / JNI)
QTP有java支持,但是AutoIt暂时还没有找到连接JNI的.au3脚本。

* QTP has powerbuilder object support which is not available thru AutoIt (unless you workaround this with virtual area's to click on)
QTP支持Powerbuilder,而AutoIt不支持。

* QTP has a translation table (control repository) to give objects a logical and a technical name. Within AutoIT you have to define this lookup

functionality yourself.
QTP有对象库,AutoIt没有。

* QTP has support for different browsers whereas AutoIT can only do this by Active Accessibility (search in forum) or bitmap comparison.

AutoIT supports IE controls by using IE.AU3 or own COM object references.
QTP支持IE和FF,AutoIt可以通过IE.au3或COM接口支持IE的操纵。


AutoIt的一些特色:
Autoit supports
* Easy screen snapshots
* Recognizes all basic windows controls
* Can recognize areas with pixelchecksum and pixelsearch (comparable with virtual objects of QTP)
* Has an advanced programming language with a lot of user defined functions
* Can be controlled from VBScript if wanted (Don't feel you should but at least you can)
* Within Scite IDE you can
** compile, build, run your scripts
** build a custom GUI for your scripts which is hard in QTP where you can only do this with an HTML page logic
** easily record simple scripts
** syntaxcoloring of your AU3 code
* You can create small standalone executables

Own experience so far
* Good support in the forums
* Good manual/help where a lot of examples are demonstrating how functions work
* Takes a litlle reading in the help before you have your basic scripts running (Windows controls and IE controls (study functions of IE.AU3))
* You need to know what you are doing. QTP brings you further at first steps but so far with QTP the userview is only for starters but quickly

you will change to expertmode for coding a better maintainable testsuite.
* Debugging loglines with consolewritecommand and run your script from within Scite as an IDE

Advice to read
* http://www.autoitscript.com/autoit3/docs/faq.htm
* http://www.autoitscript.com/forum/index.php?showtopic=37289
* Study the help file
* Check this forum

AutoIT has my vote over QTP for projects / applications where the controls are recognized properly.
WinRunner I used for about 4-5 years and AutoIT wins easily on the scripting language and functions. TSL is from ancient history compared

with AutoIT language but also here WinRunner has more support for different controls (Powerbuilder, Siebel, Java, If you don't need that

AutoIT will be a better start).

AutoIt是免费的,而QTP要花很多“银子”
AutoIT is free where QTP cost(s) a lot of money, you should made the tradeoff if spending in the beginning a little more time on AutoIT will

save you money on the long run




下面是一个使用IE.au3的AutoIt脚本,用于WEB测试自动化,例如打开URL导航到指定页面,点击页面上的指定链接等:
#include <IE.au3>
$oIE = _IECreate ("http://blog.csdn.net/testing_is_believing/")
$oLinks = _IELinkGetCollection ($oIE)
$iNumLinks = @extended

MsgBox(0, "Link Info", $iNumLinks & " links found")

For $oLink In $oLinks
   ;MsgBox(0, "Link Info", $oLink.href)
   If $oLink.href = "http://blog.csdn.net/Testing_is_believing/category/357781.aspx" Then
        $oLink.click
    ElseIf $oLink.href = "http://blog.csdn.net/Testing_is_believing/category/642324.aspx" Then
        $oLink.click
    EndIf
Next



其实,AutoIt和其他自动化测试工具可以很好地整合在一起!

           

再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值