Course curriculum

  • 1

    Introducing JUnit

    • Introduction and agenda

    • Why write tests?

    • Why do we need a testing framework?

    • Why JUnit 5?

    • JUnit 5 Architecture

  • 2

    Writing Tests With JUnit

    • Creating a new JUnit 5 Maven project

    • Creating a JUnit test

    • Running a test

    • The @Test annotation

    • Using Assertions

    • Assert methods

  • 3

    Testing Practices With JUnit

    • Test driven development with JUnit

    • Maven surefire plugin integration

    • Asserting exceptions with assertThrows

    • Life cycle and test antipatterns to avoid

  • 4

    Learning JUnit Features

    • Using JUnit lifecycle hook annotations

    • Examining BeforeAll and AfterAll

    • Changing default TestInstance behavior

    • Using DisplayName and Disabled annotations

    • Conditional executions and assumptions

    • Using AssertAll

    • Writing nested test classes

    • Using supplier for assert messages

  • 5

    Managing Tests

    • Using RepeatedTest

    • Tagging tests with @Tag

    • Using TestInfo and TestReporter

  • 6

    Conclusion

    • Wrap Up