views:

1082

answers:

3

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?

A: 

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.

Jeffrey Fredrick
I want to be able to simulate load and also test the GUI. A valid load simulation would almost certainly require a distributed system driven by a controller, but that doesn't rule out Javascript. When you say use Javascript to call into the applet, do you mean calling the Swing events?
Patrick Lee
+1  A: 

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

Dan Dyer
wow this looks pretty great. It doesn't seem to support perf testing out of the box, but I think it wouldn't be too hard to build a controller/agent framework around it
Patrick Lee
A: 

We have had a big success testing applets using QuickTest Professional (wikipedia link). We tested the applet both in it's 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.

Ran Biron