You are on page 1of 5

Junit

Introduction

 JUnit is a regression-testing framework written by Erich Gamma


and Kent Beck.
 Used by the developer for the unit testing
 JUnit is Open Source Software, released under the IBM Public
License and hosted on SourceForge
 JUnit provides a quick and easy way to write and run test cases
and test suites.
 ¨ Introduction
 ¨ Why Use JUnit?
 ¨ Design Of JUnit
 ¨ Step 1: Write A Test Case
 ¨ Step 2: Write A Test Suite
 ¨ Step 3: Run The Tests
 ¨ Step 4: Organize The Tests
 ¨ Testing Idioms
 ¨ Resources
Introduction

 JUnit (3.1 or later) has to be downloaded and installed from the


following site: www.junit.org
 1. Why Use JUnit?
 JUnit actually helps write code faster while increasing code
quality by creating synergy between coding and testing.

 JUnit tests allow you to write code faster while increasing


quality
 JUnit is elegantly simple.
 JUnit tests check their own results and provide immediate
feedback.
 JUnit tests can be composed into a hierarchy of test suites.
Junit

 Writing JUnit tests is inexpensive.


 JUnit tests increase the stability of software.
 -Avoids the ripple effect
 JUnit tests are developer tests.
 JUnit tests are written in Java