Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesTesting Java Applications


November 1997 / International Features / Bug Bounty Hunters / Testing Java Applications
Derek Jones and Rainer Mauth

When granularity [of components] becomes so tiny [as when testing Java applications], the problems of integration testing are enormous," says Jeffrey Voas, chief scientist with Reliable Software Technologies (Sterling, VA), a software research and consulting company.

Testing Java applications is difficult because developers are forced to test applets on each configuration that they plan to support. This includes the different implementations of Java virt ual machines (VMs) -- browsers as well as compilers. In addition, because Java doesn't allow a testing class to gain access to private data and methods, developers must either add test methods to a cla 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.


Up to the International Features section contentsGo to previous article: Testing Java ApplicationsGo to next article: How to Choose a Testing ToolSearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network