Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: A lightweight nonintrusive EJB testing framework

A lightweight nonintrusive EJB testing framework Summary This article presents a simple, easy-to-deploy framework that enables fine-grained tests to be run on the container, making it possible to develop and maintain Enterprise JavaBeans components usin

Tutorial Details:

Enterprise JavaBeans (EJB) has become increasingly less popular among J2EE developers in the last couple of years. Many factors contribute to this poor reputation, but high on the list is the fact that EJB components are inherently difficult to test.
In this article, I present a framework that follows the in-container test approach, but has the advantage of being simple to understand and use. It involves the following:
An additional stateless session bean
An interface that must be implemented for individual tests
An implementation of this interface for each test to be run
A JUnit base class to allow integration with the suite of tests to be executed on the client
A small modification to the build environment
The framework
Before we discuss how the framework works, let's first consider our requirements for an EJB testing mechanism:
The mechanism should be nonintrusive. That is, we should be able to deploy it with minimum interference from the application's development build environment.
Ideally, there should be minimal dependencies on additional external libraries. We'd rather not have to add jar files to the application server's classpath or to the EJB jar file's lib directory to enable the framework.
The test framework should integrate well with the JUnit tests that run on the developer's client machine.

Writing the tests themselves should be easy.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
A lightweight nonintrusive EJB testing framework

View Tutorial:
A lightweight nonintrusive EJB testing framework

Related Tutorials:

A beginner's guide to Enterprise JavaBeans - JavaWorld - October 1998
A beginner's guide to Enterprise JavaBeans - JavaWorld - October 1998
 
JavaWorld Developer Tools Guide: Testing Tools
JavaWorld Developer Tools Guide: Testing Tools
 
Dynamic user interface is only skin deep - JavaWorld May 2000
Dynamic user interface is only skin deep - JavaWorld May 2000
 
Frameworks save the day - JavaWorld September 2000
Frameworks save the day - JavaWorld September 2000
 
An open alternative to JSP - The faults of JSP So what's wrong with JSP?
How the template-based, open source API FreeMarker trumps JSP
 
The art of EJB deployment - JavaWorld August 2001
The art of EJB deployment - JavaWorld August 2001
 
J2EE or J2SE? JNDI works with both
J2EE or J2SE? JNDI works with both
 
Rumble in the jungle: J2EE versus .Net, Part 2
Rumble in the jungle: J2EE versus .Net, Part 2
 
Java tools reign supreme - JavaWorld celebrates the leading Java tools
Java tools reign supreme - JavaWorld celebrates the leading Java tools
 
Add concurrent processing with message-driven beans
Add concurrent processing with message-driven beans
 
Object-relation mapping without the container
If you follow the latest developer buzz then you\\\\\'ve likely heard of IOC (Inversion of Control) containers and AOP (aspect-oriented programming).
 
actiWATE - Free Web Application Testing Software
actiWATE is a Java-based software platform intended to make the test automation process simple and cost-effective. actiWATE currently consists of: Advanced framework for writing test scripts in Java (similar to open-source frameworks like HttpUnit,
 
Ubik
Overview Ubik aims to provide a set of distributed computing APIs that complement Java's current "official" offerings - such as EJB and Jini. The main API of the Ubik project is a RMI-like framework that allows to easily and transparently perform method
 
JDemo: Interactive Testing Refactored
This article will introduce the JDemo framework and its techniques for writing code for interactive testing. It will also show the benefits that can be gained from writing demo code.
 
A lightweight nonintrusive EJB testing framework
A lightweight nonintrusive EJB testing framework Summary This article presents a simple, easy-to-deploy framework that enables fine-grained tests to be run on the container, making it possible to develop and maintain Enterprise JavaBeans components usin
 
An Introduction to Java Object Persistence with EJB
The 'impedance mismatch' between relational databases' tabular orientation and object-oriented Java's hierarchical one is a perennial problem for which the Java world has several good solution offerings. This article, the first in a three-part series, wil
 
Testing Your Enterprise JavaBeans with Cactus
Enterprise JavaBeans provide many advantages. But each server-side/back-end developer knows that development of EJBs is sometimes painful, time-consuming, and requires a lot of patience while creating assembly descriptors, application-server-specific conf
 
Practically Groovy: JDBC programming with Groovy
Take your practical knowledge of Groovy one step further this month, as Andrew Glover shows you how to use GroovySql to build a simple data-reporting application. GroovySql combines closures and iterators to ease Java Database Connectivity (JDBC) programm
 
Introduction To Enterprise Java Bean(EJB). WebLogic 6.0 Tutorial.
Introduction To Enterprise Java Bean(EJB). WebLogic 6.0 Tutorial. Welcome to EJB Section (Learn to Develop World Class Applications with Enterprise Java Beans) (Online WebLogic 6.0 Tutorial) Introduction To Enterprise Java Bean(EJB) Enterprise
 
Creating EJB clients using the Eclipse Rich Client Platform
This article shows how to build a sample EJB client using the Eclipse Rich Client Platform (RCP), which has become increasingly popularity due to its extensible nature.
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.