• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

A Interesting project for everyone who is interested.

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Ranchers,
I have been on this forum for a while. There seems a lot of java guys here, I had a thought for everyone. I have been using JUnit for unit test for a while as well. It seems very odd, We have to write code for every class that we want to be tested. I am planning to setup a project for everyone to apply what you have learned on this real project. here is my thought,
Project name: (not sure yet)JXP (java extreme programming in short)
project Description:
A java utility tool for Java Unit testing, It takes XML file as input and use apache's log4j to output test result which may look like Junit's output.
Project Plan:
Version 1.0
Milestone build 1: able to test primitive type of parameters and return, multiple class;
Milestone build 2: able to test user define type of parameters and return
Beta 1: able to test under GUI mode (Swing base)
Beta 2: fixed most of bugs from previously release
Final Stable release:
Version 2.0
.......
PS: we will use RUP in development process. anyone who is interested please email sunny.liu@gonetix.com.
we can do further discussion about project in details, if we have enough peoples interested, I will setup a project in sourceforge.net and using Apache Software License or similar one.
I would like feedbacks from all of you, even you are not interested in this project, such as, what are you expecting from a Java Unit testing tool?
Once we set this project up, we will do requirement analyst first. I hope everyone will get chance to use USE CASE; INTERACTIVE DIAGRAM; CLASS DIAGRAM etc.
Any recommendations and feedbacks are more than welcome.
Cheers
Sunny Liu
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sunny,
Sounds cool idea ...Mmm java extreme programming ... cool project.
My guess this project will utilize XML as configuration tool to achieve unit test tasks (somewhat like Ant project), or write a source code template in XML which can generate unit test code for you. Right?
JUnit - programmers wrote the framework for programmers. What's this project's intent?
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sunny,
I think its an interesting idea and surely we can contribute from what we have learned.
I will really look forward to do requirement analysis use USE CASE; INTERACTIVE DIAGRAM; CLASS DIAGRAM .....
Java Unit test should have following like :
> should be a unit test for every public method of your class.
>Capture code comments in unit tests
>"Just-in-time" fashion, when you find the need to modify a class that doesn't have good (or any) tests
> Unit tests for that class should capture the functionality for each of its methods
Thanks & Rgds
Malay
 
Sunny Liu
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
brevity is the soul of wit - shakepeare. Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic