Testing a data source-based application using JUnit and IBM Rational Application Developer

From the developerWorks archives

Mohan K Jadhav

Date archived: May 13, 2019 | First published: February 19, 2008

In typical componentized enterprise applications, there might be a need for a unit that exclusively offers services related to the database. Often, such specialized units use data sources defined in a J2EE application server (for instance, IBM® WebSphere® Application Server). Since these units reside in the context of the application servers, testing them is sometimes complex. One common way of testing them is to create a test application that uses the data source-based component, and then deploying that test application in the application server. In such cases, developing test applications may require considerable effort on your part. This article describes a technique to test data source-based components that are deployable in an application server (such as WebSphere Application Server Version 6.0.2), using JUnit on the IBM® Rational® Application Developer Version 7.0 platform. The sample component in this article is a simple Java™-based application that provides a simple user authentication service. The article is targeted at developers who are familiar with the JUnit framework, and who have working knowledge of Rational Application Developer.

This content is no longer being updated or maintained. The full article is provided "as is" in a PDF file. Given the rapid evolution of technology, some content, steps, or illustrations may have changed.

Zone=Rational, WebSphere
ArticleTitle=Testing a data source-based application using JUnit and IBM Rational Application Developer