ss or change private classes to public classes. "Both of these options might modify the class so that some faults are not found," notes Jeffrey Payne, president of Reliable Software Technologies.
Another issue is that Java's built-in security mechanisms make the testing of applets trickier. Test tools can't easily write results to disk due to security constraints. "In addition, testing must be performed both inside of and through any corporate firewalls to ensure that applets will operate correctly," Payne adds.
To specifically address the problems of VM diversity, JavaSoft has launched the 100% Pure Java Certification program, which requires Java developers to ensure that applications are portable. SunTest, a subsidiary of Sun Microsystems, has introduced a suite
of tools that helps developers not only gain certification but also perform overall quality testing.
JavaPureCheck
checks that class files are indeed portable. It measures specified classes against a rule base. Classes that don't meet these rules are flagged, along with the construct that violates one of the portability rules. These errors and explanations are kept in a database that creates reports. You can download this tool for free from the SunTest Web site.
JavaSpin
tests Java applications at run time. It's a low-end dynamic test tool that exercises a program through its GUI.
JavaScope
is a coverage-analysis tool that includes method, branch, logical, and relational coverage (i.e., it looks at the usage of Boolean operators, which is effective for detecting boundary-condition failures). The current release does not support statement coverage, however.
JavaStar
is a GUI record and playback tool. It includes a scripting language and compares the behavior
of the program under test with the expected behavior.
JavaSpec
uses the formal specifications of an API to automatically generate test programs. Developers can verify that an implementation of an API follows its written specification. JavaSpec was selected to create and maintain the entire Java API test suite for JavaSoft.