Question

In the open source project JChemPaint, for example, the GUI is tested (using the FEST framework) by collecting about a dozen individual tests each into a few Java files. The applet is started only once per file, and several independent tests are performed in a chain.

I would like to know if this is good practice. Of course, starting up each time would cost time. I can see however problems with side effects of previous actions and possible exceptions, but I'm no expert. So, is it good practice to put several tests into one applet start?

(I'm looking also for a collection of best practices for GUI testing but can't pose such a question, hints are welcome nevertheless.)

Was it helpful?

Solution

I'm troubled by the awkward division between these two top-level containers:

org.openscience.jchempaint.application.JChemPaint org.openscience.jchempaint.applet.JChemPaintAbstractApplet.

After cursory reading, I am reluctant to be critical; but re-factoring the contents might limit the amount of duplicate testing required. In this very simplified example, common initialization is confined to the initContainer() method. By comparison, JChemPaint is considerably more complex and offers a number of applet parameters, the correct transfer of which should be tested.

Such re-factoring may be on-going. The appletests appear to date from an earlier period of development, while the newer jchempaint.src.test artifacts appear to reflect a more recent, annotation-based testing architecture.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top