590 L – Distributed Component Architecture
Medical Data Analysis

Project 4-2

Testing and System Documentation

Team Members:
Sravanthi Karumanchi
Shalini Pradhan

Galina Walters

  1. Test Plan

TEST CASE 1.

Authenticating for valid user.

INPUT INFORMATION

  1. Valid Username
  2. Valid Password

CONDITION TABLE / EXPECTED OUTPUT / OBJECTIVE / OBJECTIVE
MET?
The right login name and a fitting password are typed in. / The Output-Screen will be created by the OutputGenerator Servlet and then displayed. / Y

TEST CASE 2.

Invalid Log in

INPUT INFORMATION

  1. Username
  2. Password

CONDITION TABLE / EXPECTED OUTPUT / OBJECTIVE / OBJECTIVE
MET?
The right login name and wrong password are typed in. / The “Access Denied JSP Page” -Screen will be created by the OutputGenerator Servlet and then displayed. / Y

TEST CASE 3.

Invalid Log in

INPUT INFORMATION

  1. Username
  2. Password

CONDITION TABLE / EXPECTED OUTPUT / OBJECTIVE / OBJECTIVE
MET?
The wrong login name and a password. / The “Access Denied JSP Page” -Screen will be created by the OutputGenerator Servlet and then displayed. / Y

TEST CASE 4.

Request for information by a user logged in as a doctor

INPUT INFORMATION

  1. Username
  2. Password
  3. Role retrieved from User database

CONDITION TABLE / EXPECTED OUTPUT / OBJECTIVE / OBJECTIVE
MET?
  • All values appear once according to the role: doctor and permissions assigned to him.
/
  • Page formatted correctly with the permissions given is displayed i.e., doctor page
/ Y

TEST CASE 5.

Request for information by a user logged in as a researcher

INPUT INFORMATION

  1. Username
  2. Password
  3. Role retrieved from User database

CONDITION TABLE / EXPECTED OUTPUT / OBJECTIVE / OBJECTIVE
MET?
  • All values appear once according to the role: researcher and permissions assigned to him.
/
  • Page formatted correctly with the permissions given is displayed i.e., the researcher page
/ Y

TEST CASE 6.

Request for information by a user logged in as a researcher and a doctor

INPUT INFORMATION

  1. Username
  2. Password
  3. Role retrieved from User database

CONDITION TABLE / EXPECTED OUTPUT / OBJECTIVE / OBJECTIVE
MET?
  • All values appear once according to the role: doctor/researcher and permissions assigned to these roles.
/
  • Page formatted correctly with the permissions given is displayed i.e., the doctor page and researcher page
/ Y

TEST CASE 7.

Request for individual patient record based on the Social Security Number queried by a doctor.

INPUT INFORMATION

  1. Social Security Number.

CONDITION
/
EXPECTED OUTPUT / OBJECTIVE
/ OBJECTIVE
MET?
1.User is assigned a role as doctor
2.The entered Social Security
Number is valid.
3. Display the record of the patient when Social Security Number matches with the one entered and so with the Username entered / Page formatted correctly with the details of the patient whose social security number matches. / Y

TEST CASE 8.

Request for list of patients records supervised by the doctor.

INPUT INFORMATION

  1. Username.
  2. Retrieve first name and last name of the doctor from the table.

CONDITION TABLE / EXPECTED OUTPUT / OBJECTIVE / OBJECTIVE
MET?
1. User is assigned the role as a doctor
2. Records of the patients that match the username are displayed /
  • Page formatted to display the patient records depending on the last name and first name of the doctor retrieved from the table is displayed.
/ Y

TEST CASE 9.

Request for list of patients records sorted by age.

INPUT INFORMATION

1. Selecting age.

CONDITION TABLE / EXPECTED OUTPUT / OBJECTIVE / OBJECTIVE
MET?
1.Column consists of age of the patient.
2. User is assigned a researcher role / Page formatted correctly with age as one value. / Y

TEST CASE 10.

Request for the list of patients records sorted by duration of disease

INPUT INFORMATION

1. Duration from when the disease prevails.

CONDITION TABLE / EXPECTED OUTPUT / OBJECTIVE / OBJECTIVE
MET?
1.When the radio button, duration is selected by a researcher, the records which show the duration from when the disease prevails are displayed.
2.User is assigned a role as a researcher / Page formatted correctly with the following information:
Duration
Age
Admission date / Y

TEST CASE 11.

Request for the list of patients records sorted by age.

INPUT INFORMATION

1. Name of the disease

CONDITION TABLE

/ EXPECTED OUTPUT / OBJECTIVE / OBJECTIVEMET?
1. When the disease is mentioned all records matching the criteria are displayed / Page formatted correctly with the following information for every patient:
2. User is assigned a role as a researcher /
  • Age
  • Duration
/ Y
  • Admission date
/ Y

TEST CASE 12

Input transmission, HTML Form to the Servlet.

INPUT INFORMATION

  1. Input attributes for database setup
  2. Table column
  3. Number of Classes
  4. Computation actions

CONDITION TABLE / EXPECTED OUTPUT / OBJECTIVE / OBJECTIVE
MET?
Valid database / table / column input / All attributes and their values appear correctly in the Servlet. / Y

TEST CASE 13.

Valid Extraction of data from the User database.

INPUT INFORMATION

  1. database is set.
  2. table is set.
  3. column is set.

CONDITION TABLE / EXPECTED OUTPUT / OBJECTIVE / OBJECTIVE
MET?
Valid set database / table / column / Return value is a valid, not-empty ResultSet containing Username, Role, Set of permissions. / Y
Database has entry in ODBC table

TEST CASE 14.

Valid Extraction of data from the data database(1).

INPUT INFORMATION

  1. database is set.
  2. table is set.
  3. column is set.

CONDITION TABLE / EXPECTED OUTPUT / OBJECTIVE / OBJECTIVE
MET?
Valid set database / table / column / Return value is a valid, not-empty ResultSet containing patient’s information / Y
Database has entry in ODBC table

TEST CASE 15.

Valid Extraction of data from the data database(2).

INPUT INFORMATION

  1. database is set.
  2. table is set.
  3. column is set.

CONDITION TABLE / EXPECTED OUTPUT / OBJECTIVE / OBJECTIVE
MET?
Valid set database / table / column / Return value is a valid, not-empty ResultSet containing patient’s information / Y
Database has entry in ODBC table

TEST CASE 16.

Valid creation of the result Hashtable.

INPUT INFORMATION

  1. Computation results.

CONDITION TABLE / EXPECTED OUTPUT / OBJECTIVE / OBJECTIVE
MET?
class returns valid ResultSet / Creation of a Hashtable with the following possible content
Computations are correctly done /
  • Patient record
/ Y
  • Patient records based on age
/ Y
  • Patient records based on duration of disease
/ Y
  • Patient record based on doctor name
/ Y
  • Patient record based on SSN
/ Y

TEST CASE 17.

Output of the retrieved results as HTML.

INPUT INFORMATION

  1. filled result Hashtable.

CONDITION TABLE / EXPECTED OUTPUT / OBJECTIVE / OBJECTIVE
MET?
Valid filled result hashtable / All chosen results are printed on the screen / Y
  • Patient Records
  • Patient Records based on age
  • Patient Records based on duration of the disease
  • Patient Records based on the Social Security Number mentioned
/ Y
Y
Y
Y

TEST CASE 18.

All files can be accessed using Jboss (

INPUT INFORMATION

  1. WAR-archive

CONDITION TABLE / EXPECTED OUTPUT / OBJECTIVE / OBJECTIVE
MET?
All files are in the right position in the War archive / If you type
will bedisplayed or executed / Y
  • DataAnalysis.html
/ Y
  • Result.jsp
/ Y
  • Accessdenied.jsp
/ Y

TEST CASE 19.

Pressing “Back to main page”.

INPUT INFORMATION

1. Press the button “Back to home page”.

CONDITION TABLE / EXPECTED OUTPUT / OBJECTIVE / OBJECTIVE
MET?
The button “Back to home page” is visible. / The page home.html will be displayed. / Y

TEST CASE 20.

The sending of a request without naming the operation or naming a wrong operation.

INPUT INFORMATION


CONDITION TABLE / EXPECTED OUTPUT / OBJECTIVE / OBJECTIVE
MET?
The operation name is not valid. / Display of the wrong.jsp page / Y

II.System Documentation

1.Audience

This manual describes what system engineer should know about the Medical Data Analysis System.

2.System Description

The Medical Data Analysis System includes the use of Object Oriented Middleware technology (EJB), servlets, access to database through the use of ODBC/JDBC code, and output provided in HTML/XML format. Functionally the Medical Data Analysis System authenticates the user and allows a user to query the database consisting of a many tables with many columns to retrieve data. The location of the database is provided by a table, which is accessed by the servlet. This table contains the database name and ODBC/JDBC driver code. The tables within the databases and subsequent columns are dynamically located with SQL commands. When the user is authenticated, depending on the role he plays, the information is displayed to the user. For example if the user is a doctor, he can view all the information but if he is a researcher, certain data is kept from him to maintain privacy and security. The results are returned on the screen and available for printout in HTML/XML format. EJB OO Middleware was used to allow for distributed communication between remote objects.

3.Detailed Object/Component Description

Web Server Subsystem – technology used (Jetty). This subsystem contains objects.

  1. OutputGenerator extends HttpServlet. OutputGenerator provides input as well as displays output (i.e. provides connection to session bean and receives output from the session bean). The Servlet contains the following private attributes: establishBeanConnection().
  2. RecordRetrievalBean - Entity bean, which displays a record of the patient queried by the doctor.
  3. ListRetrievalBean- Entity bean, which displays records of all the patients queried by the researcher or the doctor.
  4. Filter Bean – This is a session bean and the queries and retrieved data are passed through this bean to the rest of the entity bean. The filter bean basically filters data depending on the role played by the user such as a doctor or a researcher.
  5. UserBean-This is an entity bean where the user is authenticated.
  6. User interface – user interface object. Created through the use of the display or keyboard.
  7. Printer interface – output device interface (results of computation generated in HTML). Created by user through selection of print option after computation option selection.

EJB Server Subsystem – technology used (JBOSS). The EJB Server Subsystem contains the following objects:

  1. FilterBean (session Bean) - controls the work flow and interaction between the webserver and database options. Attributes include the computation(s) selected, tasks, retrieval, and ctx: SessionContext. Operations include: setSessionContext(context:Session), ejbActivate(), ejbPassivate(), ejbRemove(), ejbCreate(), setTask(_tasks:Hashtable).
  2. FilterHome Interface – defines the life-cycle methods of FilterBean.
  3. FilterRemote Interface – RemoteObject of the Filter EJB with the methods :
  • GetLName(string username, string password)
  • GetfName(string username, string password)
  • Getaccess(string username, string password)
  1. tempCensor interface – system interface object
  2. PCI interface – system interface object
  3. Patient interface – system interface object
  4. Cath interface – system interface object
  5. Admit interface – system interface object

4.Inter-dependency between component or between object (side-effect of changes)

Computation and StatisticsServlet:

The addition or subtraction of code to the filter bean changed the code in the statisticalServlet code.

Between the Application server objects:

The Inter-dependency between the Application server objects are very low. We use for sending Information the very flexible Hashtable, which can store an almost unlimited amount of Objects. The dependency between the objects is reduced to know the Class type and the key-name. If there are any changes in future, the sender can put additional objects in the Hashtable and the receiver can get these additional objects without causing extra traffic or changing the method invocation.

Retrieval and Computation:

The result of the search (ResultSet) is sent directly to the filter class so that changes in the structure of the result of the database cause only a change in the filter class itself and of course in the SQL statement.

Servlet and JSP:

The Inter-dependency between the Web server objects are very low, too. The Web server is using one Main-Servlet. This concentration has the heavy advantage of adding or changing the appearance is very easy with JSP’s and without extra compilation.

5.Technology and tool description (setup, constraints, steps, etc)

JAVA2 Enterprise Edition 1.3 and 2.0

We used the current Enterprise version 1.3 because all application vendors support this specification. The J2EE platform is designed to provide server-side and client-side support for developing enterprise, multitier applications. Such applications are typically configured as a client tier to provide the user interface, one or more middle-tier modules that provide client services and business logic for an application, and backend enterprise information systems providing data management. The J2EE platform specifies technologies to support multitier enterprise applications. These technologies fall into three categories: component, service, and communication. The component technologies are those used by developers to create the essential parts of the enterprise application, namely the user interface and the business logic. The component technologies allow the development of modules that can be reused by multiple enterprise applications. The component technologies are supported by J2EE platform system-level services, which simplify application programming and allow components to be customized to use resources available in the environment in which they are deployed. Since most enterprise applications require access to existing enterprise information systems, the J2EE platform supports APIs that provide access to database, transaction, naming and directory, and messaging services. Finally, the J2EE platform provides technologies that enable communication between clients and servers and between collaborating objects hosted by different servers. In addition to JavaBeans components, which are part of the J2SE platform, the J2EE platform supports the following types of components: applets, application clients, Enterprise Java Beans components, and Web components, which are important for our project. Applets and application clients run on a client platform and EJB and Web components run on a server platform (which is in our case JBOSS and JETTY). All J2EE components depend on the runtime support of a system-level entity called a container. Containers provide components with services such as life naming, cycle management, security (Authentication and Authorisation, which are very important in the hospital), deployment, and threading. Because containers manage these services, many component behaviours can be declaratively customised when the component is deployed in the container. Communication technologies provide mechanisms for communication between clients and servers and between collaborating objects hosted by different servers: Internet protocols, Remote method invocation protocols, Object Management Group (OMG) protocols, Messaging technologies (Java Message Service (JMS), Java Mail) and Data formats (HTML3.2, XML, Image files, JAR files).

Java needs an Operating system which supports Java (e.g. Windows, UNIX, LINUX, Solaris). It is free available at After downloading and installing of the latest version you need to set the Java specific environmental variable JAVA_HOME that has to point to the installation directory of Java. The Java 2 Enterprise Edition (J2EE) needs the Java 2 Standard Edition (J2SE) environment. All Operating Systems that are support J2SE will support J2EE also.

JBOSS 2.4.1

J2EE provides a range of server choices. We used JBOSS 2.4 because it is free, available, and open-source. Because we do not have to use JBOSS specific features, the EJB-jar files can easily be transferred to another Application server. Most times you can get hints from the JBoss forum or ask directly. The Answers are most times very fast (within 24h).

ANT 1.4

Ant is a freely available Java based build tool. Instead of writing shell commands, the configuration files are XML based calling out a target tree where various tasks get executed. Each task is run by an object which implements a particular task interface and gives you the ability to cross platforms. For the development of Enterprise Java beans ANT is a valuable tool easily creating class-files for all our purposes.

JETTY 3.1.0

We needed a web server to generate results as HTML and send the result to the client. Jetty is an open source HTTP Servlet Server written in Java and supports the HTTP/1.0 and HTTP/1.1 protocols. It also supports the 2.2 javax. Servlet API defined by Javasoft and includes a JSP package which is currently the Jasper JSP engine from apache. Jetty uses Sun's JSSE reference implementation to provide support for HTTPS. The Jetty3Extra repository contains extensions such as JMX configuration and SASL authentication. It is designed to be lightweight, high performance, embeddable, extensible and flexible, thus making it an ideal platform for serving dynamic HTTP requests from any Java application. Jetty can be used as a stand-alone server running application servlets or it can be embedded in Java application to provide a WWW interface to the services that they provide. The configuration of a server is controlled by: J2EE deployment descriptors. Direct APIcalls, and XML configuration. Jetty has been instrumented as JMX model MBeans which allows it to be seamlessly integrated into the JBOSS EJB application server. This gives a complete J2EE container with HTTP, Servlets, JSPs and EJBs all within a single JVM.

JBOSS/Jetty/ANT installation involves the following steps:
  • Goto and download JBoss- 2.4.1_Jetty-3.1.RC9-1.zip. Unzip it in your Y: drive to have a directory hierarchy such as follows: Y:\JBoss-2.4.0_Jetty-3.1.RC8-1\JBoss-2.4.0_Jetty-3.1.RC8-1\jboss...
  • Goto ant/release/v1.3/bin/ to download the Ant build tool. Download jakarta-ant-1.3-bin.zip. Unzip this zip file to make a directory structure as follows: Y:\Ant\jakarta-ant-1.3\...
  • Goto to download the examples. Download documentation-example.zip. Unzip it make a directory structure as follows: Y:\examples\build\...
  • Assuming you have downloaded and unzipped all the files in the way I have specified above creating the required directory structure on your network drive Y:, run the attached batch file which would set up all the required environment variables.
  • Goto Y:\JBoss-2.4.0_Jetty-3.1.RC8-1\JBoss-2.4.0_Jetty-3.1.RC8-1\jboss\bin and type run jetty on the command prompt to start the AppServer/WebServer/Servlet Engine.

Remember one thing. Once you open a DOS window and then run the batch file to set up all the environment variables and close the DOS window, the setting up of all the variables in invalidated. So, if u open the DOW window again, make sure that you run the batch file again before trying to start the Server.