Monday, January 22, 2018
Java Development India
Call Us

India: +91 98422 26200
Technologies: JEE|EJB|Swing|XML|Eclipse|JBoss|Weblogic|Oracle|Ajax|Web 2.0|W3C| View More


JUNIT is a unit testing framework for Java Programming Language. JUnit is one of the most successful of all the unit testing frameworks. JUnit has spawned its own ecosystem of Junit extensions. Experience gained with JUnit has been important in the development of test driven development. Eclipse v. 3.1comes with JUnit built into the Workbench. Eclipse with inbuilt Junit allows one to quickly create test case classes and test suite classes to write test code in. With Eclipse, Test Driven Development (TDD), becomes very easy to organize and implement. The class that one will want to test is created first so that Eclipse will be able to find that class under test when one builds the test case class. The test cases are built with the needed imports and extensions for JUnit to run. Once the test case class is built the actual test cases are then coded in by the programmer.

Junit has the following naming conventions:-

  • Test Case Class: Named [classname]Test. java, where classname is the name of the class that is being tested.
  • Test Case Method: Named test[methodname], where methodname is the name of the method that is tested.
  • Test Suite: Default name for Eclipse is AllTests. java

It is considered a best practice in testing, to separate the test case code from the application. JUnit convention is that there is a test class created for every application class that does not contain GUI code. Usually all paths through each method in a class are tested in a unit test; however, you do not need to test trivial getter and setter methods.

Case Studies
Managing multilevel tasks
& Attendance Contact us
Challenge was to manage supply
chain of our client Contact us
UK Youtube for dreaming
footballers Contact us
Efficiently managing the
HR functions Contact us
Real Estate Management solution
Contact us
Providing solution to manage cargo
distribution Contact us
Managing activities of the
advertising industry Contact us
Real time global collaboration of
service providers Contact us
Solution for efficiently managing
stock & accounts Contact us
Copyright 2007, Java Development India All rights reserved.