RKCP Information Technology

Home » Courses   » JUnit


jUnit Testing training course teaches participants to learn about the unit testing, JUnit framework and how to set it up and use it with Java projects.


JUnit training course provides an introduction to Java's most-popular automated unit testing framework.

You will learn about the unit testing JUnit framework and how to set it up and use it with your Java projects. You will also get familiar with the test-driven development as a methodology for writing highly reliable Java code.


At the end of JUnit testing training course, the partcipants will be able to:

  • Explain JUnit's role in Java testing
  • Setup, integrate, and get started with JUnit
  • Understand the differences between JUnit 3 and JUnit 4
  • Design, organize, and develop JUnit tests in either JUnit 3 syntax or JUnit 4 syntax.
  • Use best practices in both testing and software development
  • Improve the quality and effectiveness of their software and tests

Suggested Audience:

Java developers, quality-assurance engineers, and development managers.

Duration - 1 Day


Solid understanding of Java technology is needed to get the full benefit of this course. Prior familiarity with testing concepts (e.g. unit, integration, functional, load) is recommended.


Expand All
  • 1. On Testing
    • Why testing?
    • Test, Test, and Test Some More
    • Overview of JUnit's role in testing (automated, unit, isolated, etc.)
  • 2. Introducing JUnit
    • JUnit 101
    • JUnit 3 vs. JUnit 4 vs. TestNG
    • Getting started
    • Using JUnit within Eclipse
    • Test methods: testMethod or @Test method
    • Assertions in TestCase
    • Testing for exceptions
    • Testing isolations
    • Creating and organizing test fixtures with setUp/tearDown and @Before/@After
    • Composing Test Cases into Test Suites
    • Combining Test Suites
    • Organizing Tests and Test Suites
    • Executing Tests
    • Showing Test Results
    • Integration with Ant
    • Reporting (XML and HTML)
  • 3.Why JUnit?
    • Testing with JUnit - Advantages
    • Testing with JUnit - Disadvantages
    • Exercise - Testing Simple Data Structures
  • 4. JUnit Extensions
    • Overview of JUnit Extensions: dbUnit, sqlUnit, httpUnit, htmlUnit, EasyMock, xmlUnit, etc.
    • Testing with Stubs
    • Testing with Mocks using EasyMock
  • 5. Test-Driven Development
    • Best Practices with JUnit and TDD
    • Designing Java code with testing in mind
    • Integration and functional testing with JUnit
    • Exercise - Testing Complex Data Structures