Java 2EE and XML Development

Скачать в pdf «Java 2EE and XML Development»

Testing thick clients


If your application does not employ a Web-based interface, you may need to separately test the thick-client side of the application. In such circumstance, you h
ave to test the behavior of code executing in the application client container, the J2EE term for a JVM on a client-side machine. To make your client-side testing easier, you may choose to write simple test harnesses with predictable behavior and point your client at them instead of the J2EE server. For example, a simple test harness might be an RMI object that always returns the


Getting started


same value to a caller regardless of input parameters. Using test harnesses for client components does require extra development time, but can make testing more meaningful and faster overall.


Depending on your choice of Java IDE, you may already have a debugging tool to assist you in unit testing your client-side components. For example, WebGain Studio will run your code inside its debugger, allowing you to step through executing code. This can be useful for testing components running in a local JVM. If you are not using an IDE, unit testing can still be accomplished using open source tools such as the JUnit testing framework mentioned in the previous section. There are also commercial tools on the market that provide rich functional and nonfunctional testing capabilities for applications. An example is JProbe, a Java-based testing suite from Sitraka Software. You may want to investigate these products if your IDE or open source package does not provide all of the testing metrics you require.

Скачать в pdf «Java 2EE and XML Development»