Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

Does Jtest make the grade?

Tool speeds Java development by allowing you to test from the outset

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Testing is a fundamental component of the software development process -- or at least it should be. As a developer, I know firsthand how difficult it can be to discipline oneself to test as you develop. Honestly, testing can be downright boring. To me, there's nothing more tedious than writing test cases, defining the expected outputs, debugging the test cases themselves, and then actually running the tests.

When I look for a testing tool, I want one that melds with the nature of testing. Anything less will fail like a New Year's resolution; you'll stick with it for a while, but inevitably you'll revert to your old bad habits.

Pros and cons of Jtest

Pros
  • Excellent documentation, tutorials, and examples
  • Superior support for static analysis, white box, and black box testing
  • Can begin testing out of the box
  • Responsive GUI
  • Stubs and automatic testing features allow testing from the outset of a project
  • Cons
  • Nonintuitive interface
  • Rules Builder can be frustrating at first
  • Pricey


As a developer, I want a tool that supports unit and regression testing. The tool must provide feedback quickly, easily, and reliably. Honestly, when evaluating a testing tool, I look for instant gratification. ParaSoft's Jtest for Linux fulfills these requirements -- and then adds some surprises of its own.

Why test?

When deadlines loom, it is often tempting to put off testing as long as possible since it seems to take time away from development. Unfortunately, the more you put off testing, the more trouble you'll get yourself into later. Luckily, when done right, testing can actually speed up the development process.

Testing doesn't only help you find bugs. In fact, once you get into the habit of testing as you code, you will find that testing can actually speed up development, not hinder it. There are three main ways that testing helps you program:

How we tested

Hardware
  • Processor: 866mhz PIII
  • Memory: 512 MB RAM
  • Mass storage: 13.6-GB SCSI hard disk
  • Configuration: Uncustomized Red Hat workstation
  • Platform
  • Operating System: Red Hat Linux 6.1
  • Kernel: Uncustomized 2.2.12
  • Testing methods
  • Jtest was used to test various java.util classes such as Stack and Vector, as well as classes written by the author.


First, testing decreases development time by decreasing the amount of time that you must spend debugging code. Testing as you develop catches bugs earlier. If you catch a bug early on you won't give yourself a chance to add another! You will find it easier to debug code that contains only one or a small number of problems. However, the longer you wait to test the longer you give yourself to introduce more errors into your code. Code that has multiple bugs takes much longer to fix than code in which each bug is fixed as soon as it is detected.

Second, testing decreases development time by encouraging safe reuse. Unit testing allows you to test and validate each of your components individually. Once you validate a component you can reuse it with the assurance that the component will work properly. So, when new bugs do crop up, you can be fairly certain that the bug lies in the code that uses the component, not the component itself. Unit testing allows you to build a solid base of reliable software components. You can use these components safely since they won't introduce problems in your new programs.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources