java Selenium 之于 Web UI 测试就像 ________ 之于 Windows 应用程序 UI 测试
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1137448/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Selenium is to Web UI testing as ________ is to Windows application UI testing
提问by user128807
I'm interested in UI testing a client only Java application. What is the most popular framework for doing so? What is your recommended framework? Also, why doesn't Selenium do this (or does it)? It seems to me that anything that can test a web app should be able to test a windows app.
我对测试仅限客户端的 Java 应用程序的 UI 感兴趣。最流行的框架是什么?你推荐的框架是什么?另外,为什么 Selenium 不这样做(或这样做)?在我看来,任何可以测试 Web 应用程序的东西都应该能够测试 Windows 应用程序。
采纳答案by wax
Try FEST framework. This is what was previously known as Abbot, if I'm not mistaken. I use this for automated testing and it seems to be very simple and convenient. Simple things are made easy and complex things are not a rocket science there. I considered UISpecj4j, but it didn't suite me, because there is no technical possibility to test Drag'n'Drop while it's a must. Besides it's quite difficult to develop tests when you don't actually see what's happening (UISpec4J uses fake, invisible look'n'feel)
尝试FEST 框架。如果我没记错的话,这就是之前所说的方丈。我用这个做自动化测试,看起来很简单方便。简单的事情变得容易,复杂的事情在那里不是火箭科学。我考虑过 UISpecj4j,但它不适合我,因为没有技术可能性来测试 Drag'n'Drop,但它是必须的。此外,当您实际上看不到正在发生的事情时,开发测试非常困难(UISpec4J 使用假的、不可见的外观)
The only thing is making troubles in FEST (also, by design) - it grabs a mouse and doesn't let you do anything while it running a test.
唯一的事情是在 FEST 中制造麻烦(也是设计使然)-它会抓住鼠标并且在运行测试时不让您做任何事情。
回答by Anton Gogolev
We use TestComplete.
我们使用TestComplete。
回答by Bill the Lizard
Try the Abbot Java GUI Test Framework.
回答by Grimarr
The reason Selenium can't do this is that it uses Javascript running in the web browser to do the testing. It simulates clicking buttons, entering data, etc via Javascript. If Javascript is disabled, it won't work. And since Swing/AWT apps don't have Javascript, Selenium won't work on them, either.
Selenium 不能这样做的原因是它使用在 Web 浏览器中运行的 Javascript 来进行测试。它通过 Javascript 模拟点击按钮、输入数据等。如果 Javascript 被禁用,它将无法工作。而且由于 Swing/AWT 应用程序没有 Javascript,Selenium 也不能在它们上工作。
回答by avandeursen
The answer is: "Mercury winrunner", which was hugely popular in the late 90s, and which is probably still widely used for win apps.
答案是:“Mercury winrunner”,它在 90 年代后期非常流行,并且可能仍然广泛用于 win 应用程序。
Not sold as such anymore, but if I'm not mistaken now available as HP QuickTest Professional. See the wikipedia page on HPQTP.
不再以这种方式出售,但如果我没有记错的话,现在可以作为 HP QuickTest Professional 使用。请参阅HPQTP 上的维基百科页面。
Its now became HP Unified Functional Testing(UFT)2
它现在变成了 HP 统一功能测试 (UFT) 2
回答by Adrian Grigore
If you have Visual Studio 2010, you could also use the newly introduced Visual Studio UI Automation Testing(also known as Coded UI). It's a bit like using Selenium with an ui-map.
如果您有 Visual Studio 2010,还可以使用新引入的Visual Studio UI 自动化测试(也称为编码 UI)。这有点像使用带有 ui-map 的 Selenium。
回答by achalsudheer
回答by AutomatedTester
Selenium is JavaScript based Framework so can only run on things that can execute JavaScript. Browsers do this natively.
Selenium 是基于 JavaScript 的框架,因此只能在可以执行 JavaScript 的东西上运行。浏览器本身就是这样做的。
As far as I am concerned there isn't really a Testing Framework that is comparable to Selenium on the desktop because it is quite hard to write a framework that hooks into the OS as natively as Selenium Hooks into the Browser. Popular, not necessilary best, are QTP, SilkTest, TestComplete
就我而言,在桌面上并没有真正可与 Selenium 相媲美的测试框架,因为编写一个像 Selenium 钩入浏览器一样本机地钩入操作系统的框架非常困难。流行的,不一定是最好的,是QTP, SilkTest, TestComplete
回答by Jill Renee
回答by user1991293
If you are looking for an open-source tool, have a look at Marathon. It lets you record and play back tests, generate reports, and integrate your own code for testing custom components. I've been using it for several years and have hundreds of tests.
如果您正在寻找开源工具,请查看Marathon。它允许您记录和回放测试、生成报告并集成您自己的代码以测试自定义组件。我已经使用它好几年了,并进行了数百次测试。
There is also a commercial version with more features, but I have not tried it. The open-source version works great for me.
还有一个功能更多的商业版,不过我没试过。开源版本对我来说非常有用。

