GUI的自动化测试 [英] Automated testing of GUI

查看:173
本文介绍了GUI的自动化测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题是不是单元测试。而且它是一个桌面产品。

这是有关GUI测试和测试正确的东西是在正确的时间以正确的文本框中输入。

This is about testing of the gui and testing that the right stuff is input in the right text box at the right time.

我在使用WinRunner的使用,以工作的公司(不同的部门,所以我不知道多说了),而现在惠普已经停运,但他们似乎并不认为不屑无论你留在惠普或去别处。您无法读取有关产品,直到你已经注册了而烦恼。

A company I used to work at used WinRunner (different department so I don't know much more that that), but that has now been shutdown by HP but they don't seem that bothered whether you stay with HP or go elsewhere. You can't read about the product until you've signed up which is annoying.

工具与MFC(非流通)和理想的工具,工作也将...

The tool has to work with MFC (non-negotiable) and the ideal tool will also...


  • 自动进行。

  • 可脚本。

  • 不同的屏幕分辨率自动工作。

  • 可以对单个静态文本框'间谍',等等。

  • 直观足以让非程序员可以创建脚本。

  • 的报告工具,包括个人用户的电子邮件。

做什么其他SO用户对于自动化GUI测试呢?

What do other SO users do for automated GUI testing?

推荐答案

我们使用Rati​​onal Robot中的 SAFS框架( RRAFS)。还有用于WinRunner的(WRAFS)SAFS的实现,它看起来像他们有一个新的基于图像的测试的实施,这一点我不太熟悉。

We use the SAFS framework for Rational Robot (RRAFS). There are also SAFS implementations for WinRunner (WRAFS) and it looks like they have a new "Image-Based Testing" implementation, which I'm not familiar with.

这个框架确实从分隔条件测试脚本的用户界面实现了很好的工作。我测试过两个不同的团队开发的Web应用程序四个版本(使用一个队传统的ASP,一个使用ASP.NET),我只需要改变我的UI对象的应用程序映射,测试本身并不需要改变。

This framework does a nice job of seperating the UI implementation from the test scripts. I've tested four releases of a web application developed by two different teams (one team using classic ASP, one using ASP.NET) and I only had to change the application map of my UI objects, the tests themselves didn't need to change.

这表示,该框架的语言繁琐,需要时间来适应。这不是很健壮,在语言结构方面,但也有一些努力,你可以做任何你需要。这有点像在Windows批处理语言编程,但对于测试;)

That said, the language of the framework is cumbersome and takes getting used to. It's not very robust, in terms of language constructs, but with some effort you can do anything you need to. It's sort of like "programming" in Windows Batch language, but for tests ;)

要解决上述您的个人要求:

To address your individual requirements above:

1)工具与MFC(非流通)上班。
该SAFS框架使用第三方记录回放工具来驱动测试,如Rational Robot中或水星WinRunner的。如果该工具可以与MFC应用程序交互,那么该框架可以。我不知道基于图像的测试的实施如何驱动测试,但我猜想它也可以用MFC工作。

1) The tool has to work with MFC (non-negotiable). The SAFS framework uses a 3rd party "record-playback" tool to drive the tests, like Rational Robot or Mercury WinRunner. If that tool can interact with MFC apps, then the framework can. I don't know how the "Image-Based Testing" implementation drives the tests, but I'd guess it can also work with MFC.

2)的自动完成。
该SAFS框架与 STAF框架,这将允许您自动化您的测试执行集成。我有一个使用STAF开始从图像池中的VM映像证明了概念测试,安装应用程序测试,运行RRAFS测试,并把结果Web服务器供其他人在上车。

2) be automated. The SAFS framework integrates with the STAF framework, which will allow you to automate the execution of your tests. I have a proof-of-concept test that uses STAF to start a VM image from a pool of images, install the application under test, run the RRAFS test, and put the results on a web server for others to get at.

3)可脚本。
是的,但如前所述,它不是最强大的编程语言。我写了一个Excel插件,我们的测试人员使用来写他们的测试,简化的东西一点点。

3) be scriptable. Yes, but as mentioned, it's not the most robust programming language. I wrote an Excel add-in that our testers use to write their tests that simplifies things a little bit.

4)自动与不同的屏幕分辨率的工作。
是的,因为它看起来的幕后的UI对象,而不是屏幕。除了一句图像为基础的测试选项...

4) work with different screen resolutions automatically. Yes, since it's looking "under the covers" at the UI objects and not the screen. Except for maybe the "Image-based Testing" option...

5)能够在单个静态文本框'间谍',等等。
是的,你可以等待UI对象出现,即消失,有一个值,要改变一个值,等等。

5) be able to 'spy' on individual static text boxes, etc. Yes, you can wait for a UI object to appear, disapper, to have a value, for a value to be changed, etc.

6)的直观足以让非程序员可以创建脚本。
随着一些训练。我们已经取得有限的成功。有些人QA可以写测试,有些挣扎。

6) intuitive enough so non-programmers can create the scripts. With some training. We've had limited success. Some QA folks can write the tests, some struggle.

7)的报告有工具,包括个人用户的电子邮件。
是的,使用STAF框架,你可以发布结果到Web服务器,发送电子邮件等。

7) have reporting tools, including email of individual users. Yes, using the STAF framework you can post results to a web server, send out emails, etc.

这篇关于GUI的自动化测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆