Running
JUnit Tests
Community
Grids Lab,
This document provides
instructions for running the test cases for several classes within the FIRMS code
base.
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. For this command to run please
do not forget to put the junit.jar file in ANT_HOME/lib directory.
We have developed test cases for some of the classes within the cgl.narada.wsinfra.util,
cgl.narada.wsinfra.wsa.impl, cgl.narada.wsinfra.wsr.impl
and cgl.narada.wsinfra.wsrm.impl packages. These test
cases are located under cgl.narada.wsinfra.util.test,
cgl.narada.wsinfra.wsa.impl.test, cgl.narada.wsinfra.wsr.impl.test and
cgl.narada.wsinfra.wsrm.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
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
1.3
Testing
the cgl.narada.wsinfra.wsr.impl package
The classes listed below
correspond to test cases for classes residing in the cgl.narada.wsinfra.wsr.impl
package. The classes listed below corresponds to the test cases for classes
residing in the cgl.narada.wsinfra.wsr.impl.test
package
The classes listed below
correspond to test cases for classes residing in the cgl.narada.wsinfra.wsrm.impl
package. The classes listed below corresponds to the test cases for classes
residing in the cgl.narada.wsinfra.wsrm.impl.test
package
2.
Executing
the Test
Step 1: First go to the FIRMS base (distribution)
directory. In our case this is
/usr/local/OMII/webservices/FIRMS
and execute the following command to run all the tests
/usr/local/OMII/webservices/FIRMS>
ant test
Figure
1 below depicts the output of this command. For each
test it displays the following: Number of tests run, Failures, Errors and Time
elapsed



Figure 1 Execution of "test" ant target command