HomeDigital EditionSys-Con RadioSearch Java Cd
Advanced Java AWT Book Reviews/Excerpts Client Server Corba Editorials Embedded Java Enterprise Java IDE's Industry Watch Integration Interviews Java Applet Java & Databases Java & Web Services Java Fundamentals Java Native Interface Java Servlets Java Beans J2ME Libraries .NET Object Orientation Observations/IMHO Product Reviews Scalability & Performance Security Server Side Source Code Straight Talking Swing Threads Using Java with others Wireless XML
 

Bean-Test 3.1 by Empmirix,Inc.

In this new era of rapid application development (RAD), there's an ever-increasing push to get applications into production without adequate testing. This methodology does meet deadlines, but it can also lead to serious implications for your business's future. For example, many Internet companies deploy applications that lack the ability to handle high loads, or their applications aren't scalable enough to grow with the increasing demands of the business. With a little testing these simple mistakes can be caught before an application goes into production.

I've been developing applications since 1996 and have seen an increasing trend within many development teams to rush a product out the door without adequate testing. Recently I reviewed a new version of a testing tool named Bean-test from Empirix, Inc. Bean-test is an application tool built from the ground up to test your EJBs on BEA WebLogic, IBM WebSphere, Bluestone's Total-e-Server application servers, or any other EJB 1.1 application server.

Installation of Bean-test is straightforward. Since it's built using 100% Java, installation of the server and associated client agents are relatively simple on many platforms. Once the installation is complete, starting Bean-test on Windows is a breeze. Within a matter of seconds the Bean-test user interface pops up in your default Web browser, and you're ready to begin testing EJBs.

Getting Started with Bean-test: Sample EJBs
Empirix provides an excellent tutorial session on using the demo beans. During your evaluation period you have the option of spending one hour with an Empirix representative who will show you the entire program and how to generate a test case.

To use the demo beans you need to deploy them to your application server; in my case, I deployed them to a WebLogic 5.1.0 SP8 server running on the same machine. To deploy the sample beans to the application server, click on a file located in the Bean-test installation directory and add a couple of WebLogic JAR files to the Bean-test classpath configuration page. Now you're ready to begin generating test cases (see Figure 1).

figure 1
Figure 1:  Bean-test Test Case Screen

Once the Bean-test user interface is loaded, you should first set up your servers. A neat feature within the Bean-test product is that you can install Bean-test clients (agents) on remote machines. In the setup tab you can add or configure the machines that will participate in the test process. With the agents you can specify the number of Java Virtual Machines (JVMs) that will be spawned on those machines as well as the weight of that system. This comes in handy if you have several machines with different amounts of memory or processing power, as it provides an accurate test of your EJB. Also, under the setup tab you can edit the application server properties. This enables you to add, delete, or modify application servers, classpath variables, and other information.

With Bean-test, project creation is easy and quick. You need to indicate the project name, select the type and version of application server you wish to use, and specify the classpath to the EJB JAR files that are installed on the application server. Once this is completed, Bean-test will automatically find and display the EJBs it found within your JAR files. You can even tell Bean-test to automatically create test cases for all the beans it finds. This is especially handy if you have 50 beans and wish to test them all.

Now that a test case has been generated, you can view the generated client code. A feature of Bean-test is that all code is generated in a standard open fashion, enabling you to either edit the client code using the built-in editor within the Bean-test UI, or load the file into your favorite development tool for further editing.

Bean-test is very flexible with regard to actual test data. For supplying test data you can choose between randomly generated data and data from a data table, or enter the data directly on the screen. Data tables are typically comma-delimited files and can be edited with any type of editor. This allows for greater control over the application data that will be supplied to your EJB.

Running the Test Case
If you have distributed clients set up, you can request the server to pack up the appropriate client files and ship them out to each remote client. When your tests are done, Bean-test's extensive reporting system allows you to see where problems can develop within your application. It enables you to also designate a test result as a baseline so you can compare different test results to gain insight as to how your EJBs perform under varying situations.

Bean-test by Empirix is a robust testing tool that's flexible enough to meet the testing needs of today's rapid development market. You can download an evaluation copy of Empirix's Bean-test product at www.empirix.com

Author Bio
Cedrick W. Johnson works with object-oriented programming projects at Acxiom Corporation in Downers Grove, Illinois. Johnson is also studying computer science at Northern Illinois University. He can be reached at [email protected]

 

All Rights Reserved
Copyright ©  2004 SYS-CON Media, Inc.
  E-mail: [email protected]

Java and Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. SYS-CON Publications, Inc. is independent of Sun Microsystems, Inc.