-->

Selenium is to Web UI testing as ________ is to Wi

2019-01-22 07:35发布

问题:

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.

回答1:

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)

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.



回答2:

We use TestComplete.



回答3:

Try the Abbot Java GUI Test Framework.



回答4:

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.



回答5:

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.



回答6:

The answer is: "Mercury winrunner", which was hugely popular in the late 90s, and which is probably still widely used for win apps.

Not sold as such anymore, but if I'm not mistaken now available as HP QuickTest Professional. See the wikipedia page on HPQTP.

Its now became HP Unified Functional Testing(UFT)2



回答7:

uispec4j is an open-source alternative. I haven't tried it yet, though. (I'm currently collecting lists of things to try as well, so thanks for asking the question!)



回答8:

Selenium is JavaScript based Framework so can only run on things that can execute JavaScript. Browsers do this natively.

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



回答9:

QTP , Silktest are the best tools for testing the Windows application UI.



回答10:

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.

There is also a commercial version with more features, but I have not tried it. The open-source version works great for me.



回答11:

Try Sikuli

Sikuli is a technology born in MIT UI Design group that allows to automate computer operations using computer vision. Computer vision recognizes patterns from screenshots of graphical user interfaces (GUI) and Jython script language is used to take actions on them. Language includes graphical elements and is best edited with IDE that comes with the software. Sikuli can be used for automated software testing, like Selenium is used to control a web page, it can control pretty much any interface that it can recognize and click or enter text - PC (Windows, Mac OS X and Linux) applications, and even an iPhone or Android application running in a simulator or via VNC.

You can also use Sikuli Java API

Sikuli API for Java provides image-based GUI automation functionalities to Java programmers. It is created and will be actively maintained by Sikuli Lab. This new Java library has a re-designed API and includes several new functions that were not available in the original Sikuli Script, such as the abilities to match colors, handle events, and find geometric patterns such as rectangular buttons. Moreover, it has a greatly simplified build process based on Maven.