Surety is performing system maintenance this weekend. Electronic date stamps on new Prior Art Database disclosures may be delayed.
Browse Prior Art Database

Method to generate JUnit template to test Java class in IBM WebSphere Studio Application Developer

IP.com Disclosure Number: IPCOM000012634D
Original Publication Date: 2003-May-19
Included in the Prior Art Database: 2003-May-19
Document File: 1 page(s) / 40K

Publishing Venue



Disclosed is a method to avoid typing lots of code and making this tool more user friendly and increasing the productivity of developers.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 100% of the total text.

Page 1 of 1

  Method to generate JUnit template to test Java class in IBM WebSphere Studio Application Developer

Currently when creating JUnit test cases for Java* classes in the WSAD** env, one has to manually type a lots of code, although some of the code are the same for every test case and could be automatically generated by the tool.

As JUnit is an open source test framework, it requires test cases utilizing the framework to be written in a certain way. For example:

- all the test cases should inherit from core class JUnit.framework.Testcase. - all test cases should have a constructor with a string parameter - test cases normally should overwrite setup() and teardown() methods, etc.

Disclosed is a method to automatically create template JUnit classes based on the regular Java classes information. When an user wants to create a JUnit test case for a Java class, he can right click on the class and select "Generate JUnit test case". A dialog should pop up at this time, allowing the user to indicate what package he would like the unit class to be created in. After providing necessary info the user can click on the "Finish" button and the test classes will be generated into the specified package. A user can also right click on a package and select "Generate JUnit test cases for classes in this package".

* Trademark of Sun Microsystems, Inc. ** Trademark of International Business Machines Corporation

Disclosed by International Business Machines Corporation