| By Jim Milbery | Article Rating: |
|
| September 1, 2001 12:00 AM EDT | Reads: |
14,997 |
ParaSoft
2031 S. Myrtle Ave.
Monrovia, CA 91016
888 305-0041
www.parasoft.com
Test Environment:
Toshiba Satellite Pro 4600, 866
MHz Intel Pentium III processor,
20GB disk, 256MB RAM,
Windows 2000 w/Service Pack 2
Specifications:
Platforms: Windows NT/2000/98/ME, Linux, Solaris
Pricing: $3,495/developer
New-car buyers often fear that they're getting a "Friday afternoon" vehicle - a car built by the last shift at the end of a tough week. Manufacturers have spent an untold number of man-years trying to prevent such defects.
As developers you face the same problem: no matter how carefully you work, you'll inevitably make mistakes. The quality assurance department within your organization should be able to catch your mistakes before they make it into production, but they're the last line of defense. Ideally, you'll want to test your code before it makes its way over to the QA department. The sooner you find the problem, the easier it is to fix.
A number of products can help you test your code - but many of these solutions require you to write complicated test routines and scripts. These scripts often get out of sync with the code as project deadlines grow short. ParaSoft offers a fresh alternative with their Jtest 4.0 product.
Jtest Particulars
Jtest, itself a Java application, provides three different types of testing for your Java code:
The simplest of these is static testing. Jtest compares your Java source code against a set of predefined coding rules, checking source code against a variety of rules from over 20 different categories. As a programmer I generally dislike this type of automated source-code checking because it rarely takes into account my personal coding style. However, static testing is an invaluable resource for project managers as it helps ensure that coding styles are consistent across developers and programs. It's much easier to support and maintain code that's been built in a consistent fashion across modules. In this era of "guerilla" software development, such consistency checking is doubly important. Jtest allows you to edit the static testing rules, making the entire process much more palatable. Figure 1 shows the Jtest rules list in the overlay window.
You can pick and choose from the list of prebuilt rules, and you can use the RuleWizard to add customized rules. The complete set is then stored as a file that can be shared among developers. Thus the project manager can configure a single set of rules that can be applied across an entire team of developers. I was able to use Jtest on some sample Java code (as shown in Figure 1) and it quickly pointed out some of the most common mistakes. (Jtest can't access JAR-based code, for example, and you have to provide Java source files for static analysis.)
The second layer of testing offered by Jtest, white-box testing, checks to ensure that a class is structurally sound. (It doesn't attempt to verify that a class behaves according to specification.) With Jtest you may need to create some "test classes" to thoroughly exercise certain types of code (such as EJBs, RMI, and application server integration).
Black-box testing checks that a class behaves according to specification (test cases the user generates). It checks that the class produces the correct output (outcomes) for a given input (or set of inputs). Jtest can derive inputs from your code by using Design by Contract (DbC) instrumentation, and you can also create explicit test classes that Jtest will use to exercise your code. (Jtest's static tests can help you to verify that the DbC assertions are contained within your Java code.)
ParaSoft provides extensive documentation on its Web site, including tutorials, FAQs, and user manuals. I was relatively impressed with the amount of information available there for developers, and I encourage you to take a look. When the time comes to run a trial of the software, you can download it from the site, though you'll need to request a license key for Jtest. The key is machine-specific, that is, you can't use the software on multiple machines without requesting multiple license keys.
I was able to get the software installed quickly and easily. Jtest uses a Java-based user interface, and it's relatively speedy. The UI maps errors and deficiencies back to your Java source code, but it doesn't automatically coordinate the outline controls in the display windows. (You can select an error condition in the results display and Jtest will open up the appropriate detailed results window, but it's up to you to click through the detailed results window to get to the specific line items.) Jtest automatically handles regression testing, so I was able to make iterative changes to my code and fix errors as I went along.
JDJ Product Snapshot
Summary
Jtest 4.0 offers a nice platform for building consistent, well-tested Java applications. The integration of static, white-box, and black-box testing makes Jtest an interesting product, but to harness the complete power of Jtest you'll need to invest in the Design by Contract programming methodology.
Published September 1, 2001 Reads 14,997
Copyright © 2001 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Jim Milbery
Jim Milbery is a Vice President with William Blair Capital Partners, a venture capital firm based in Chicago. He has over 19 years of experience in application development and relational databases. He is the former applications editor for "Wireless Business and Technology", the past product reviews editor for Java Developer Journal and the author of "Making the Technical Sale". Jim can be reached at jmilbery@williamblair.com, or via the company web site at http://www.wbcapitalpartners.com
- Kindle 2 vs Nook
- Why IBM’s Server Chief Got Busted
- Is Cloud Computing Like Teenage Sex?
- Industry Experts Discuss the State of Cloud Computing
- Performance Tuning Essentials for Java
- Confessions of a Ulitzer Addict
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- It's the Java vs. C++ Shootout Revisited!
- Cloud Computing Can Revitalize Your Career as Software Developer
- IBM Could "Reinvent" Java: Mills
- Oracle & Cloud Computing: Exclusive Q&A with SVP Richard Sarwal
- A Brief History of Cloud Computing
- Kindle 2 vs Nook
- Cloud CEOs, CTOs & SVPs to Speak at 4th International Cloud Computing Expo
- Why IBM’s Server Chief Got Busted
- Is Cloud Computing Like Teenage Sex?
- Industry Experts Discuss the State of Cloud Computing
- Performance Tuning Essentials for Java
- The Difference Between Web Hosting and Cloud Computing
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- Ajax in RichFaces 3.3, JSF 2 and RichFaces 4
- Confessions of a Ulitzer Addict
- My Thoughts on Ulitzer
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- A Cup of AJAX? Nay, Just Regular Java Please
- Java Developer's Journal Exclusive: 2006 "JDJ Editors' Choice" Awards
- The i-Technology Right Stuff
- JavaServer Faces (JSF) vs Struts
- Rich Internet Applications with Adobe Flex 2 and Java
- Java vs C++ "Shootout" Revisited
- Bean-Managed Persistence Using a Proxy List
- Reporting Made Easy with JasperReports and Hibernate
- Creating a Pet Store Application with JavaServer Faces, Spring, and Hibernate
- What's New in Eclipse?
- Why Do 'Cool Kids' Choose Ruby or PHP to Build Websites Instead of Java?
- i-Technology Predictions for 2007: Where's It All Headed?








































