Unit Testing with JUnit - 3 days Online Classroom

1.950,00 EUR

  • 3 days
Live Virtual Classroom
In House / In Company

Build the skills to create reliable, maintainable, and high-quality Java applications through effective automated testing. This hands-on Unit Testing with JUnit course teaches developers and testers how to design, write, and execute robust unit tests using JUnit 5 and Mockito.

Key Features

Language

Course material in English

Level

Beginner - Intermediate level

3 days (8 hours/day) online instructor-led

40+ recommended study hours

Hands-on practice in coding live labs

Downloadable learning materials

Ask for date confirmation!

Program completion certification included

Hero

Learning Outcomes

At the end of this program, you will be able to:

Conditional and Parameterized Testing

Create flexible tests that run under specific conditions or validate multiple data sets using a single test method, improving coverage while reducing duplication.

Mocking and Stubbing with Mockito

Use Mockito to isolate code by mocking dependencies, creating stubs and spies, verifying interactions, and testing components in a controlled environment.

Testing Advanced Java Applications

Learn techniques for testing I/O operations, DAOs, servlets, and multi-threaded applications, while improving reliability and reducing flaky tests.

Test-Driven Development (TDD)

Apply the Red-Green-Refactor cycle to write cleaner, more maintainable code, improve software quality, and prevent regressions through test-first development.

Hero

Course timeline

  1. Day 1

    Session 1: Unit Testing Fundamentals

    • Unit testing concepts, terminology, and best practices
    • Test structure, assertions, and code coverage
    • Overview of software testing types

    Session 2: Getting Started with JUnit

    • JUnit fundamentals and key features
    • Setting up JUnit with IntelliJ, Maven, and Gradle
    • Creating and running basic unit tests
    • Overview of JUnit alternatives

    Session 3: JUnit Annotations

    • Core test lifecycle annotations
    • Test configuration and execution controls
    • Managing setup, teardown, ordering, and extensions

    Session 4: Assertions and Assumptions

    • Common JUnit assertions and validations
    • Exception, timeout, and collection testing
    • Assumptions for conditional test execution
    • Grouping and organizing test checks
  2. Day 2

    Session 5: Conditional Testing

    • Running tests based on OS, JRE, system properties, and environment variables
    • Creating custom test conditions

    Session 6: Parameterized Testing

    • Building parameterized tests with JUnit
    • Using argument sources, conversion, and aggregation
    • Customizing test display names

    Session 7: Test Doubles

    • Understanding dependencies and test doubles
    • Working with stubs, mocks, and proxies

    Session 8: Mockito Fundamentals

    • Creating mocks and spies with Mockito
    • Stubbing behavior and verifying interactions
    • Using annotations, argument matchers, and static mocking
  3. Day 3

    Session 9: Testing I/O, Data Access, and Web Components

    • Testing applications that interact with I/O streams
    • Validating data access logic using transaction rollbacks
    • Improving testability by separating business logic from servlets

    Session 10: Testing Concurrent Applications

    • Reviewing shared data and thread interactions
    • Strategies for testing multi-threaded code
    • Using repeated tests and handling non-deterministic behavior
    • Leveraging third-party tools and testing best practices

    Session 11: Test-Driven Development (TDD)

    • Introduction to TDD principles
    • Benefits and challenges of test-first development
    • The three core TDD rules
    • Applying the Red-Green-Refactor cycle
Unit Testing with JUnit

Who Should Enroll in this Program?

Software Developer / Engineers

Software Testers and QA Engineers

Test Automation Engineers

Developers adopting JUnit for the first time

Java professionals looking to improve testing practices

Teams implementing automated testing and TDD methodologies

Start course now

Prerequisites

  • Working knowledge of Java programming
  • Familiarity with object-oriented programming concepts
  • Basic understanding of Java development tools and workflows
  • Experience with Java APIs such as Collections, I/O, or JDBC is beneficial but not mandatory

Statements

Licensing and accreditation

The course is offered according to Partner Program Agreement and complies with the License Agreement requirements.

Equity Policy

Candidates are encouraged to reach out to AVC for guidance and support throughout the accommodation process.

Frequently Asked Question

Contact background

Need corporate solutions or LMS integration?

Didn't find the course or program which would work for your business? Need LMS integration? Write us, we will solve everything!