JUnit

What is JUnit and how it is used?

Questions by sunil79

Showing Answers 1 - 3 of 3 Answers

JUnit is a unit testing framework for the Java programming language. JUnit has been important in the development of test-driven development, and is one of a family of unit testing frameworks which is collectively known as xUnit that originated with SUnit.

JUnit is linked as a JAR at compile-time; the framework resides under package junit.framework for JUnit 3.8 and earlier, and under package org.junit for JUnit 4 and later.

  Was this answer useful?  Yes

Code
  1. span style="color: #006699;">org.junit.*// Code executed before the first test method      

  2. // Code executed before each test    

  3. // Code that tests one thing

  4. // Code that tests another thing

  5. // Code that tests something else

  6. // Code executed after each test  

  7. // Code executed after the last test method

  8.     }

  9. }

  Was this answer useful?  Yes

Satendra Kumar

  • Nov 10th, 2014
 

JUnit is primary testing which is done by programmer to ensure that my code is a quality code.
we can used unit testing by creating test cases ........

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions