Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

JUnit

Introduction

© 2017 Wipro wipro.com confidential 1


Agenda

Introduction to JUnit

© 2017 Wipro wipro.com confidential 2


Objectives
At the end of this module, you will be able to explain:
 Basics of JUnit

© 2017 Wipro wipro.com confidential 3


Introduction to JUnit

© 2017 Wipro wipro.com confidential 4


JUNIT
 JUnit is an open source testing framework for Java

 JUnit test cases are Java classes that contain one or more unit test methods

 It is a simple framework for creating automated unit tests

© 2017 Wipro wipro.com confidential 5


JUNIT(Contd).
 These tests are grouped into test suites
• JUnit tests are pass/fail tests explicitly designed to run without human intervention
• JUnit can be integrated with several IDEs, including Eclipse
• The JUnit distribution can be downloaded as a single jar file from
http://www.junit.org
• It has to be kept in the classpath of the application to be tested

© 2017 Wipro wipro.com confidential 6


Junit - an open source testing framework
JUnit has these advantages:
 it's simple to use
 it can test a single class at a time, or a suite of tests can be created for a group of classes
 it greatly increases your confidence in the correctness of your code
 it often improves the design of the class you are testing - since you spend more time
thinking about how an object is actually used, instead of its implementation, defects in its
interface become more obvious.

© 2017 Wipro wipro.com confidential 7


Summary
 Introduction to JUnit

© 2017 Wipro wipro.com confidential 8


Thank You

© 2017 Wipro wipro.com confidential 9

You might also like