What is the best mechanism for testing applets?

2019-06-16 06:31发布

I'm trying to effectively build a functional test suite for an applet, and I'm trying to find a good framework for it.

In the past, when I wanted to design a test suite that would serve as both functional and load testing on an application, it has always been a web-based application, or at least some kind of service-based application, and I've used something like grinder to build up test scripts and use them to simulate users.

With a Java applet, it's not clear to me what, if any, mechanism may exist for me to consume and run usage scripts against the GUI and thus simulate a user clicking on form controls.

Does anyone have any experience with this?

3条回答
▲ chillily
2楼-- · 2019-06-16 06:57

Have a look at FEST Swing. It makes it easy to drive and test Swing GUIs. It supports applets.

查看更多
Viruses.
3楼-- · 2019-06-16 06:58

I'm sure this isn't the best choice these days but years ago I used WinRunner for testing Java applets.

But are you looking to create load or are you looking to test the GUI of the applet? Because you can do an end-around and have a page where you use Javascript to call into the applet, then use any browser testing tool to invoke your JS methods.

查看更多
贼婆χ
4楼-- · 2019-06-16 07:07

We have had a big success testing applets using QuickTest Professional (wikipedia link). We tested the applet both in its natural environment (browser) and using a specially built "cradle" which takes over the browser part and embed the applet in a JFrame (so we can test JavaScript input/output, start/stop, close the frame and look for leaks and activate generally hidden / forbidden interfaces).

Disclosure: I'm a developer in HP which develops QuickTest Professional.

查看更多
登录 后发表回答