开发者

How do we test our Java UI?

开发者 https://www.devze.com 2023-03-13 01:32 出处:网络
We\'re loo开发者_运维百科king at record and playback type test tools to automate some of our UI functional testing.

We're loo开发者_运维百科king at record and playback type test tools to automate some of our UI functional testing. We've looked at most of the usual suspects from Silke to QTP and none of them work. They all fall over when a right click is required to select something off a right click menu, or when you have to choose a value in a drop down list in a grid.

Does anyone know any tools that can handle this type of UI?


We have made good experiences with Squish. You can identify UI elements by IDs or record mouse actions.


Are you talking about a stand-alone Java application, or is it web-based, with Java on the server, but HTML delivered to the client?

Assuming it's a stand-alone Java application, SilkTest and QTP ought to play nicely with Java. (Are you using the appropriate Java add-in/plugin for Java support? QTP has a separate add-in for Java support.) Another tool to consider would be IBM Rational Functional Tester. It's built in Java and works well with Java apps. I've used all 3 tools, though never SilkTest on a Java app. In my experience, both QTP and RFT performed well with Java apps.

That having been said, on every test automation project, there are going to be UI controls that do not work great out of the box with the selected automation tool. (3rd party controls are usually the culprit). In these cases, you will need to manually code a work-around. In the example of right-clicks not working as expected, I have often needed to forego clicking to select an item from a right-click menu in favor of using keystrokes to select the desired item. What this really points to is that you have to let go of the notion of record/playback being an effective means of automation.

Additionally, it might be instructive for you to post the actual code that was recorded, and at which line it fails to select the item in question. The actual script code could give me some clues as to what is actually going on.


Sahi is good option for recording and playback like testing stuff.
Here is a sample tutorial.

0

精彩评论

暂无评论...
验证码 换一张
取 消