Hi all,
This project just like Ant project, It takes a XML file as input, basicaly, xml file is just a test case descriptor, It tells how many classes you are going to test, which constructor your going to use to instanciate your class? what publich method are you going to test and what paramters you want to pass into coresponsed method? etc.
I have finished Core functions package now. it can test primitive type parameters and
String. I am working on custom type parameters and log4j plugin at this moment.
Here is a sample XML file I used to test a testxlass called Testee. (ommit <test-constructor> element means use default constructor without parameter.)
<?xml version="1.0" encoding="utf-8" ?>
<test-suite>
<test-case class="com.sunny.jxp.test.Testee">
<test-constructor>
<param>
<type>java.lang.Double</type>
<value>10</value>
</param>
<param>
<type>java.lang.Integer</type>
<value>12</value>
</param>
</test-constructor>
<test-method name="intAddition">
<param>
<type>java.lang.Integer</type>
<value>10</value>
</param>
<param>
<type>java.lang.Integer</type>
<value>12</value>
</param>
<return>
<param>
<type>java.lang.Integer</type>
<value>22</value>
</param>
<condition>eq</condition>
</return>
</test-method>
<test-method name="doubleAddition">
<param>
<type>java.lang.Double</type>
<value>10</value>
</param>
<param>
<type>java.lang.Integer</type>
<value>12</value>
</param>
<return>
<param>
<type>java.lang.Double</type>
<value>22</value>
</param>
<condition>eq</condition>
</return>
</test-method>
<test-method name="concateString">
<param>
<type>java.lang.String</type>
<value>OK</value>
</param>
<param>
<type>java.lang.String</type>
<value>Yes</value>
</param>
<return>
<param>
<type>java.lang.String</type>
<value>OKYes</value>
</param>
<condition>eq</condition>
</return>
</test-method>
</test-case>
</test-suite>
Any comments are more than welcome. If you are interested, drop me an email and I can send src codes and Ant build file to you.
Thanks
[ March 29, 2002: Message edited by: Sunny Liu ]