探讨软件自动化测试

发布新日志

  • 常见截图工具比较

    2008-07-10 10:52:36

    截图工具比较

    截图工具是一个测试人员必不可少的辅助工具,以下是常见的截图工具:

    FullShot 9
    HyperSnap-DX 6
    MadCap Capture 1
    Paint Shop Pro 9
    RoboScreen Capture 2
    SnagIt 8
    TNT Screen Capture 2

    详细内容查看下面链接的文章:

    Review of Screen Capture Tools

     

     

  • andLinux让Windows和Linux和谐共处

    2008-03-31 09:20:13

    andLinux是一个基于Ubuntu Linux和coLinux (将Linux内核运行在Windows上的一个项目)的自由软件项目,其目的是让你不需要使用VMWare之类的虚拟机就可以在Windows下运行 Linux;它让Linux成为Windows的一个应用程序,用户可以同时使用 Windows 和 Linux 而不需要像使用虚拟机那样来回切换!

    andLinux 的好处在于:
    1. 方便开发人员开发和调试跨 Windows 和 Linux 平台的程序。
    2. 几乎不用做任何修改即可在 Windows 上运行绝大多数 Linux 应用程序!

    目前 andLinux 提供 XFCE(最大需要 2.5GB 空间)和 KDE(最大需要 4.5GB 空间)两种版本,安装文件和程序文件已经编译成 EXE 文件,双击鼠标即可安装或运行。注意:你需要在 NTFS 分区上安装,因为FAT32格式不支持大文件!

    文件下载及详细介绍请访问 andLinux 网站:http://www.andlinux.org/index.php

  • 体验:VMware和Virtual PC 2007 比较(转帖)

    2008-02-22 10:09:41


    最近感觉没啥事做,忽然想起重温一下Windows98,可是在目前的机器上装Windows98显然不太现实,我所有的硬盘分区都是NTFS格式的,不说装不上去,甚至连硬盘都找不到,没辙,只能用虚拟机。说实话我以前可从来没用过虚拟机这玩意,不得以,只能应者头皮上了,顺便还可以体验一下Linux的神奇魅力,哈哈
    话说我从网上DOWN下VMware和Microsoft Virtual PC 2007,网上对这两款软件的孰优孰劣一直是争论不休,不过就目前的两者的较新版本而言我想VMWARE应该说更胜一筹。
    不过,我的VMWARE用的是5.5版本,关键是这个版本一来有破解版,还有汉化版,但是最新版本是6.0版本,由于没试过,就不做评论了。至于 Virtual PC 2007,自从Microsoft接手之后,便是去掉了对Linux的支持,除了对Windows全系列的支持外,则支持OS/2系统。
    先说说两者对Windows的支持,不知道为啥,在Windows 98模式下,VMware所模拟出来的声卡Windows98死活不认识,于是乎,发声只能放弃,Virtual PC2007则正常,好歹他模拟出来的是创新sb16声卡,这个一般的操作系统都能识别。另外vmware并没有模拟出显卡,而是采用vmtools加载项的方式模拟出显卡,而Virtual PC这是模拟的古老的S3显卡(4m显存),一般来说后者应该说显示质量优于前者,但是不知道是不是我设置的问题,VMTOOLS的色彩表现明显优于 VirtualPC的S3显卡。在速度上,Windows 98系统基本上没有区别。
    接下来,我尝试安装新的Windows 2000 PRO系统,安装过程此处略过不提,由于VirtualPC和VMware虚拟硬盘的机制不同,VPC所采用的是动态虚拟硬盘技术, Windows2000默认给你的是一个虚拟的16GB的硬盘,但是该虚拟硬盘实际占用空间视你在虚拟机的实际文件大小而定,而不是直接在物理硬盘上划出 16GB空间,这很显然也不太现实。而Vmware这是采用固定空间划分,因此我在设置虚拟空间时候划出5GB的空间给Win2000,此时物理硬盘相应的也少了5GB空间。
    实际使用中,两者安装过程,差不多都用了约30分钟安装,各项硬件都能完美的识别,虽然采用不同的网卡技术,但是都能同时共享上网,只是在文件共享方面需要注意的是,VMWARE居然不支持Windows98的文件共享,但是安装了VMTOOLS之后可以直接从主机采用文件拖拽的方式,直接复制到虚拟机,如果在不同文件夹拖拽文件一般,非常方便。并且能够实现,主机--客户机的鼠标平滑过度,不需要另外切换鼠标,但是Virtual PC上,这一点还有待改善,需要按右Alt键才能在主机(HOST)和客户机(Guest)之间切换光标,同时,也不能随意拖拽文件,但网上有人说可以拖拽,我目前还没有发现设置方法。
    速度方面:就我的体验而言,似乎VMware在虚拟Windows 2000方面优于Virtual PC,模拟出来的Win2000非常流畅,但是Virtual PC模拟出来的似乎中有点拖沓感觉,不那么流畅,不知道是不是没有设置好的缘故。网上有人说Virtual的磁盘效率不高,可能也是这个原因,另外,我想 S3显卡本身很垃圾,也可能与这个有关,但是实际上VMTOOLS的显卡也很垃圾。
    Linux方面,微软在2003年通过收购Connectix而进入虚拟机市场,因而Virtual PC已经不再支持了,因此在兼容性方面Vmware显然更胜一筹。但是,我在Vmware上安装了国产的中科红旗RedFlag 5.0桌面版,且不提安装过程几乎花了一个小时,进入界面后,也不太流畅。总之Linux没有给我很好的体验。就Linux本身而言,他与Windows 在用户体验方面还有很大差距,比如操作烦琐,尽管X Windows的界面已经可以说是高度仿真Windows了,但是,其软件按转过程,虽然RPM包相比过去有很大提高,但是很多设置仍然需要以命令模式运行(桌面是有个终端控制器),使用上较为烦琐,需要用户具备一定的计算机支持并且是较为熟悉Linux命令,更多的东西甚至还需要用户手工编译,这对一般用户可以说是不可想象的。我想这也是Linux迟迟不能击败Windows的重要原因,但是Linux仍旧是个非常有前途的操作系统,可以这么说,操作系统上几乎所有的新技术都源于Linux开源社区,毕竟人多力量大,但是也由于没有完善的商业化运营,LInux始终没有系统的整合这一优势。比如,3D的界面,是Linux首创,但是目前把它发扬光大的却是Windows Vista,透明界面也是如此,尽管苹果的OS X在这方面颇有建树,但是苹果自己建立的壁垒限制了OS X在普通用户之间的推广,就我看来,苹果如果能开放OS X在普通PC机上的安装限制,击败Windows Vista并非天方夜谭,可是人为的壁垒,尽管已经被破解,但是破解方法又不是普通用户能够承受的,甚至我都懒得为了体验一下OS X搞那么复杂的过程。在开源社区Linux和OS X嘲笑Windows Vista都是“剽窃”他们的创新时候,似乎也该自己想象,为什么这个“剽窃者”迄今都还站在自己头上拉屎拉尿。
    Windows的成功不仅在于他本身有创新更在于他能够成功的借鉴最新的技术成果并用在自己的上面,给用户以最简单最简洁的体验。简单就是美,Microsoft深谙这一真理。
    还是说说Virtual和Vmware,尽管Vmware拥有技术上以及一些优势,但是有一些却是Vmware不具备但是Virtual PC所具备的,正如上面所提到的,简单。Virtual PC建立一个虚拟机的过程比Vmware简单得多,他不需要用户过多的参与虚拟机整个的设置,甚至在接触了vmware后再接触Virtual PC之后的第一感觉就是“这个东西怎么这么简陋”,不仅界面简单,操作也简单,只需要按照向导直接点击下一步就可以了,你所做的仅仅是需要选择一下你要安装的操作系统,接下来仅仅就是安装系统而已,安装完后,开始体验吧。但是Vmware却没有这么简单,他需要慢慢设置硬盘的模式,网卡的模式,还要安装 vmtools以求获得更好体验,尽管这看起来很专业,在各位高手看来可以说是功能强大的代表,但是对于一般用户而言,这无疑是一道技术门槛。此外在内存分配方面,VMware是直接占有你所预先分配的内存,而Virtual PC则是仅仅规定了内存上面,同样是256MB,前者直接从你的物理机里面扣掉256MB内存,后者则是用多少取多少。实际上后者的技术更为先进。但是有文章说vmware的内存使用效率更高,不只是处于何种根据。
    另外还有一点非常重要,VMware内存占用率较高,这是因为他在服务中增加了几乎5个服务进程,且设置为自动启动的,也就是每次开机都自动启动服务,结果我的机器每次开机内存消耗都达到320MB的消耗,而Virtual则在不启动时候不占用任何内存。这样直接导致一个问题,VMware在配置不高的 HOST物理主机上不能开太多个虚拟主机,事实上也证明了这一点,我多开了几个Windows 2000,搞得我点物理机鼠标都成问题。我可是P4 3G,DDR2 1GB的内存啊。
    总结一下:Vmware功能强大,更适用于要求高的DX们使用,但是消耗系统资源较多。Virtual PC高效节约系统资源,适合初级用户使用,孰优孰劣还是用户自己去评论吧。
    Virtual PC 2007和VMware的区别
    区别分类 Virtual PC 2007 VMWare
    虚拟硬盘 动态分配硬盘空间 预先划分硬盘空间
    虚拟内存 动态分配物理内存只规定最大内存消耗 预先划定最大使用内存且无论使用否都独占
    网络共享 现有网卡上绑定 模拟网卡实现网络共享,但功能很有限
    Virtual PC emulated switch服务
    模拟显卡 模拟S3 4M显存显卡 未能模拟,通过加载VMTools实现真彩
    支持OS 除UNIX,Linux系统所有,支持Vista 支持所有操作系统,但Vista的兼容系较差
    使用授权 免费 收费
    ps:Virtual PC可是免费的哟,Vmware则只提供试用,是要钱的,呵呵。


  • tester and SDET

    2007-12-04 15:48:56

    The tester is dead! Long live the SDE/T

    Posted on 星期五, 12 十月 2007

    Testing in Australia has a problem. The Australian IT industry still views testing as a job that anyone can perform with minimal technical skills. A quick search on a leading recruitment site has a number of advertisements for Testers with requirements similar to the following:

    - At least 3 years experience in a Tester or Test Analyst role with demonstrated experience in planning and executing functional, systems and regression tests.

    - Excellent written and verbal communications skills will be a must for this role - the right candidates must be able to develop clear and concise test cases and test scrīpts

    - Some previous experience using Test Director or Quality Center - any exposure to automated test tools (particularly QTP) would be a benefit

    - Experience of various software testing approaches and SQL in oder to extract data for tests.

    - A methodical nature and high levels of attention to detail.

    (Extra points to those of you who noticed the spelling error in the advertisement = "oder" instead of "order".)

    This ad is typical of those here in Australia for testing positions. No programming skills required, no industry specific knowledge, just X number of years in testing, good communication skills and some experience with a particular test tool vendor's product.

    I'm a big fan of analogies so let's imagine for a second that a car company uses non technical testers to evaluate new cars under development. I can imagine a dialogue between a test driver and an engineer going something like this:

    "The new car feels a bit funny at the front"

    "What do you mean by funny?"

    "Well I turn the round thinngy in the there ..."

    "oh you mean the steering wheel"

    "yeah, the steering feel. I turn the steering feel to this way, but the car doesn't turn as much as I thought it would."

    "It's a wheel, not a feel."

    "oh sorry, wheel"

    "Anyway, so let me see if I understand you. When you turn the wheel, and the front of the car doesn't turn as much as you expect it to."

    "Exactly"

    By comparison, a test driver that understands how a car works can have a much more meaningful conversation with the engineer:

    "It has mid-corner understeer, after turn in."

    "Ok we can solve that by increasing camber slightly or adjusting the rear springs."

    "Let's try the spring adjustment, as changing camber will also effect tire wear."

    The technical tester is much more effective than the non technical equivalent as they have similar, equivalent or superior knowledge to the engineer but simply a different focus and specialist skills. Whilst my example is fictional, the exact same difference in conversation should be expected between a "Tester" and a SDE/T. What is an SDE/T? An SDE/T is one of the common, technical testing roles at Microsoft. Their testing careers page has the following descrīption:

    Software Design Engineer in Test
    Tests and critiques software components and interfaces in more technical depth, writes test programs to assure quality, and develops test tools to increase effectiveness.

    At Devtest, this is what we do as well using, the same tools, knowledge and experience, as all the other "developers" on the project. The key difference, however is we have a different focus, live in different .Net namespaces (lately System.windows.Automation) and have different goals. However we aren't any less capable at writing code that the "developers" on the project. 

    What we constantly have to battle is a prejudice that if you have test somewhere in your job title we are somehow lesser beings, and are not valued or required on most projects. We are seen by people starting out in the industry as un-cool and very few people would consider testing as a career, this is just crazy, we use C#, visual studio, TFS and other cool tools, just like everyone else, we just have a different focus. The "tester is dead" long live the SDE/T.

  • 在C#中调用QTP

    2007-12-03 17:51:43

    一。引用QTP的 dll文件
    二。
           static void Main(string[] args)
            {

                //Run application
                QuickTest.Application qtApp = new QuickTest.Application();
                qtApp.Launch();
                qtApp.Visible = true;
     
            }
  • How to call application with VBscript

    2007-10-25 17:43:09

    Dim IE
    Set IE=CreateObject("InternetExplorer.application")
    IE.visible=1
    IE.navigate"http://www.google.com"
    'wait a while until IE is finished to load
    Do While IE.Busy
    Loop
Open Toolbar