
Understand JUnit's architecture with three components: the basic platform to run tests, the Jupiter extension for Java 8 features, and the G-Unit Windage module for backward compatibility.
Create a Maven project for a Java arithmetic calculator and configure JUnit Jupiter dependencies. Write and run basic test cases for add, subtract, multiply, divide, and modulus.
Master how to write assertions for arrays, strings, and collections in JUnit 5, using value-based equals and deep element checks across lists and sets to verify results.
Master the art of enabling and disabling tests in junit 5 by using environment variables, operating system checks, and Java version conditions.
Master JUnit 5 by ordering test methods with a class-level ordering annotation and per-method order values, ensuring tests run in a specified sequence while remaining self-contained.
Explore repeated tests in JUnit 5 with @RepeatedTest and repetition info. Measure memory and CPU load across repetitions using lists and streams.
Group tests by functionality with a JUnit 5 suite to run selected packages or classes, configuring inclusion and access as needed.
This course is for Java developers who are trying to learn JUnit5 to test their code.
JUnit is probably the most widely used unit testing framework for Java developers. It is the next iteration of JUnit after Junit4 and has a number of new features added.
Knowing how to test your code automatically and enabling your code to be seamlessly tested as part of a CICD pipeline is a "must have" for any developer.
With this course you learn:
JUnit 5 architecture - You learn the basic architecture of JUnit5 and how it builds on top of the JUnit testing platform.
Lifecycle annotations - @Test, @BeforeEach, @AfterEach, @AfterAll @BeforeAll
Testing using assertions - You learn to test for equality, null, exceptions etc...
Various testing scenarios - Write test cases using @RepeatedTest, @ParameterizedTest, @ConditionalTest
Grouping tests - group various tests using @Nested and @Suite annotations.
Reporting test results using maven. With just a few additions to your maven configuration, you will be able to publish these results to a web-page and also share it with your team.
All of the coding will be done on Eclipse. However, if you are familiar with IntelliJ, that should be fine too.
The course will be completely hands on, except when it is required to explain concepts.