Skip to content

A comprehensive collection of test examples created with JUnit 5

License

Notifications You must be signed in to change notification settings

sudo-su-me/mastering-junit5

This branch is 2209 commits behind bonigarcia/mastering-junit5:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8a5f557 · Jan 3, 2021
Jan 2, 2021
Sep 12, 2020
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 3, 2021
Jun 29, 2018
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 2, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jan 3, 2021
Jun 29, 2018
Sep 12, 2020
Mar 5, 2017
Jan 2, 2021
Sep 12, 2020
Sep 12, 2020
Jan 2, 2021
Jan 2, 2021

Repository files navigation

Build Status License badge Support badge Twitter Follow

This repository contains code examples of JUnit 5 for the book Mastering Software Testing with JUnit 5, authored by Boni Garcia and published by Packt. These examples covers the main features of JUnit 5, such as:

  • JUnit 5 tests lifecycle.
  • Assertions.
  • Tagging and filtering tests.
  • Conditional test execution.
  • Nested and repeated tests.
  • Migration from JUnit 4.
  • Dependency injection.
  • Dynamic tests.
  • Test interfaces.
  • Test templates.
  • Parameterized tests.
  • Parallel execution.
  • Ordered tests.

Moreover, the integration with third-party frameworks and technologies is also illustrated with examples, concretely:

  • Mockito (popular mock framework).
  • Spring (Java framework aimed to created enterprise applications based on dependency injection).
  • Docker (container platform technology).
  • Selenium (test framework for web applications).
  • Appium (driver for mobile devices).
  • Android (open source mobile operating system based on Linux).
  • REST services (using REST Assured, Retrofit2, or WireMock).

JUnit 5 versions

This repository has different tags, one per minor version of JUnit 5. Currently, the available tags are the following:

  • 5.0: Examples using JUnit 5.0.3. The examples of the book Mastering Software Testing with JUnit 5 are based on this version.
  • 5.1: Examples using JUnit 5.1.1.
  • 5.2: Examples using JUnit 5.2.0.
  • 5.3: Examples using JUnit 5.3.2.
  • 5.4: Examples using JUnit 5.4.2.
  • 5.5: Examples using JUnit 5.5.2.
  • 5.6: Examples using JUnit 5.6.3.

Complete example

The project Rate my cat! contains a sample web application based on Spring Boot (Spring MVC, Thymeleaf, and Spring Data JPA) with a complete set of JUnit 5 tests (unit with Mockito, integration with Spring, and end-to-end tests with Selenium).

About

This is a project made by Boni Garcia, Assistant Professor at Universidad Carlos III de Madrid, Spain. Copyright © 2017-2021.

About

A comprehensive collection of test examples created with JUnit 5

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 99.3%
  • Other 0.7%