Running JUnit tests

Community Grids Lab, Indiana University

 

 

This document provides instructions for running the test cases for several classes within the FINS codebase.

 

1.         Development of Test Cases

We have leveraged JUnit (version 3.8.1) while writing  test cases for these classes. We have also added a command within the build.xml file that is part of this distribution to facilitate the testing in a simplified manner. We have developed test cases for some of the classes within the cgl.narada.wsinfra.util, cgl.narada.wsinfra.wsa.impl and cgl.narada.wsinfra.wse.impl packages. These test cases are located under cgl.narada.wsinfra.util.test, cgl.narada.wsinfra.wsa.impl.test and cgl.narada.wsinfra.wse.impl.test packages respectively.

 

1.1         Testing the cgl.narada.wsinfra.util package

The classes listed below correspond to test cases for classes residing in the cgl.narada.wsinfra.util package. As mentioned in the previous paragraph these test classes reside in the cgl.narada.wsinfra.util.test package

 

  • ExceptionToFaultConversionTest.java
  • QNameLocatorTest.java
  • SoapHeaderProcessorTest.java
  • SoapMessageAlterationTest.java
  • SOAPMessageModifierTest.java
  • UniqueIntGeneratorTest.java
  • XmlContentTransferTest.java
  • XmlDateTimeConversionTest.java

 

1.2         Testing the cgl.narada.wsinfra.wsa.impl package

The classes listed below correspond to test cases for classes residing in the cgl.narada.wsinfra.wsa.impl package. These test classes reside in the cgl.narada.wsinfra.wsa.impl.test package

 

  • AddressingHeadersImplTest.java
  • ParseWsaHeadersImplTest.java
  • WsaFaultRulesImplTest.java

 

1.3         Testing the cgl.narada.wsinfra.wse.impl package

The classes listed below correspond to test cases for classes residing in the cgl.narada.wsinfra.wse.impl package. The classes listed below corresponds to the test cases for classes residing in the cgl.narada.wsinfra.wse.impl.test package

 

  • WseElementCreationImplTest.java

 

2.         Executing the Test

Step 1: First go to the WSE base (distribution) directory. In our case this is

/usr/local/OMII/webservices/wse

 


 

Step 2: Type the following command to run all the tests

/usr/local/OMII/webservices/wse> ant test

The screen shots below depict the output of this command. For each test it displays the following: Number of tests run, Failures, Errors and Time elapsed