Java Testing Jumpstart: From Zero to Hero

Java Testing Jumpstart: From Zero to Hero

Master the essential Java testing toolbox and start writing effective tests for your applications in just two days

Duration
1-2 days
Participants
Up to 15 developers
Format
On-site or Remote

Workshop Overview

Java Testing Jumpstart: From Zero to Hero is a comprehensive two-day workshop designed specifically for Java developers who want to build a solid foundation in automated testing. Whether you’re new to testing or looking to formalize your knowledge of the Java testing ecosystem, this workshop provides hands-on experience with the essential tools every Java developer should master.

Over two intensive days, you’ll learn how to effectively use JUnit 5, Mockito, Testcontainers, WireMock, and AssertJ to create robust, maintainable test suites for your applications. Through a carefully designed progression of concepts and hands-on exercises, you’ll develop practical skills you can immediately apply in your daily work.

Who Should Attend

This workshop is perfect for:

  • Junior to mid-level Java developers with limited testing experience
  • Self-taught developers looking to fill gaps in their testing knowledge
  • Teams wanting to establish a common testing foundation
  • Developers transitioning to Java from other languages
  • Computer science graduates entering professional development

No previous testing experience is required, but participants should have basic Java programming skills.

Workshop Format

The workshop follows a structured, hands-on approach:

  • Interactive Lectures: Concise explanations of key concepts with live demonstrations
  • Guided Exercises: Step-by-step implementation of testing techniques
  • Practical Challenges: Real-world testing scenarios to solve independently or in pairs
  • Code Reviews: Collaborative review of solutions with best practice discussions
  • Progressive Project: Building a complete test suite for a sample application

The workshop can be delivered either on-site at your location or remotely via video conferencing. All exercises are designed to work seamlessly in both formats.

Prerequisites

Technical requirements:

  • Java 11 or later installed
  • IntelliJ IDEA (Community or Ultimate) or Eclipse
  • Git client
  • Maven or Gradle
  • Internet access for downloading dependencies

Knowledge prerequisites:

  • Basic Java syntax and concepts
  • Familiarity with object-oriented programming
  • Experience writing simple Java applications

Sample Workshop Outline

Day 1: Building Your Testing Foundation

Morning Session (9:00 AM - 12:30 PM)

  • Testing Fundamentals (1.5 hours)

    • Why testing matters: bugs, refactoring, and documentation
    • Types of tests: unit, integration, end-to-end
    • The testing pyramid concept
    • Characteristics of good tests (FIRST principles)
    • Hands-on: Setting up a Java project with testing dependencies
  • JUnit 5 Deep Dive (2 hours)

    • JUnit 5 architecture and components
    • Writing your first test cases
    • Assertions, assumptions, and test lifecycle
    • Parameterized tests and dynamic tests
    • Extensions and customization
    • Hands-on: Building a comprehensive test suite for a utility class

Afternoon Session (1:30 PM - 5:00 PM)

  • Mocking with Mockito (2 hours)

    • Understanding test doubles: mocks, stubs, and spies
    • Creating and configuring mocks
    • Verifying interactions with mocked components
    • Capturing arguments and answering calls
    • Common pitfalls and best practices
    • Hands-on: Testing service components with dependencies
  • Expressive Assertions with AssertJ (1.5 hours)

    • Benefits of fluent assertions
    • Testing collections, exceptions, and complex objects
    • Creating custom assertions
    • Combining AssertJ with JUnit and Mockito
    • Hands-on: Refactoring basic assertions to expressive AssertJ statements

Day 2: Advanced Testing Techniques

Morning Session (9:00 AM - 12:30 PM)

  • Integration Testing with Testcontainers (2 hours)

    • Introduction to container-based testing
    • Setting up database containers
    • Testing with actual dependencies vs. mocks
    • Database state management between tests
    • Performance considerations
    • Hands-on: Implementing database tests with Testcontainers
  • API Testing with WireMock (1.5 hours)

    • Testing applications with external API dependencies
    • Setting up WireMock servers
    • Stubbing responses and verifying requests
    • Simulating error conditions and edge cases
    • Recording and playback for complex APIs
    • Hands-on: Testing a service that consumes external APIs

Afternoon Session (1:30 PM - 5:00 PM)

  • Building Maintainable Test Suites (1.5 hours)

    • Test organization and naming conventions
    • Testing patterns for common scenarios
    • Balancing coverage and maintenance
    • Handling test data effectively
    • Continuous testing in development workflow
    • Hands-on: Refactoring poorly structured tests
  • Introduction to Test-Driven Development (1.5 hours)

    • The TDD cycle: Red, Green, Refactor
    • Benefits and challenges of TDD
    • When to use (and not use) TDD
    • Adapting testing practices to your team’s needs
    • Hands-on: Implementing a feature using TDD
  • Putting It All Together (1 hour)

    • Integrating all tools in a complete testing strategy
    • Testing in CI/CD pipelines
    • Resources for continued learning
    • Workshop review and Q&A

What You’ll Take Away

By the end of this workshop, you’ll be able to:

  • Write clear, effective tests using JUnit 5
  • Use Mockito to isolate units of code
  • Write readable assertions with AssertJ
  • Test database interactions with Testcontainers
  • Mock external services with WireMock
  • Organize tests for maintainability
  • Apply test-driven development principles
  • Understand when to use different testing approaches
  • Confidently build comprehensive test suites for your applications

You’ll also receive reference materials, cheat sheets, and sample code to help you apply what you’ve learned after the workshop.

Topics Covered

  • Testing fundamentals and best practices
  • Writing effective tests with JUnit 5
  • Mocking dependencies with Mockito
  • Integration testing with Testcontainers
  • API testing with WireMock
  • Expressive assertions with AssertJ
  • Test-driven development basics
  • Creating maintainable test suites

Book This Workshop

Starting at 2.490€ / team
Schedule Now
Contact us for custom pricing or to schedule this workshop for your team

Includes:

  • Comprehensive workshop materials and slides
  • Hands-on exercises with sample applications
  • Testing cheat sheets and reference guides
  • Workshop recording for future reference
  • Certificate of completion
Have questions?
Contact us

Your Instructor

Philip Riecks

Philip Riecks

Lead Instructor

Philip is a Java testing expert who has trained hundreds of developers in effective testing practices. With experience across numerous enterprise projects, he specializes in making testing concepts accessible to developers at all experience levels.