Generating and Using Declarations


One of the problems with testing a GUI is that during program development the labels or positions of components often change, causing any tests on those components to fail. Another problem is that the default names can be so cryptic that reading source code and log files is unnecessarily slow.

JavaStar addresses these problems by providing an easy way for you to generate component declarations for each window in your GUI. These are written out as .java files, one file per window. Once you've generated these files (called JavaStar declaration files) you can then edit them to replace developer or default component names with more meaningful names. Then you compile these into classes and record scripts that reference these declarations files.

Now, when a component name changes you only have to edit its references in the JavaStar declaration file and recompile. All tests that reference the component will continue to run. Without declaration files, you need to update every script that references the changed component.

This chapter describes:




Send feedback to JavaStar-feedback@suntest.com
Copyright © 1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303. All rights reserved.