• Stars
    star
    363
  • Rank 117,374 (Top 3 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Examples of the Packt book "Mastering Software Testing with JUnit 5"

Build Status badge-jdk License badge Support badge Twitter Follow

This repository contains the code examples of JUnit 5 for the book Mastering Software Testing with JUnit 5, authored by [Boni García] and published by Packt.

These examples cover 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 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 WebDriver (test automation library for web applications).
  • Appium (test automation library 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.
  • 5.7: Examples using JUnit 5.7.2.
  • 5.8: Examples using JUnit 5.8.2.

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

Mastering JUnit 5 (Copyright © 2017-2023) is a project created and maintained by Boni Garcia and licensed under the terms of the Apache 2.0 License.

If you like my work, please consider nominating me for the GitHub Stars program.

More Repositories

1

webdrivermanager

Automated driver management and other helper features for Selenium WebDriver in Java
Java
2,364
star
2

selenium-jupiter

JUnit 5 extension for Selenium WebDriver
Java
225
star
3

dualsub

DualSub: bilingual subtitles maker
Java
172
star
4

selenium-webdriver-java

Examples of the O'Reilly book "Hands-On Selenium WebDriver with Java"
Java
111
star
5

webdrivermanager-examples

JUnit tests with Selenium WebDriver and WebDriverManager
Java
111
star
6

rate-my-cat

Sample application for the book "Mastering Software Testing with JUnit 5"
Java
25
star
7

novnc

Standalone noVNC client based on Alpine
Dockerfile
21
star
8

web-programming-examples

Examples of web applications using Java and Angular, among other technologies
HTML
20
star
9

bonigarcia.github.io

Personal web page of Boni García
JavaScript
16
star
10

webgl-examples

webgl-examples
HTML
13
star
11

webdrivermanager-spring-boot

Basic project with JUnit tests using Spring-Boot, Selenium WebDriver and WebDriverManager
Java
11
star
12

selenium-jupiter-examples

Test examples using Selenium-Jupiter, Selenium WebDriver, and JUnit 5
Java
10
star
13

webdrivermanager-basic

Basic project with JUnit tests using Selenium Webdriver and WebDriverManager
Java
8
star
14

browserwatcher

Browser extension for console monitoring, tab recording, Content Security Policy (CSP) disabling, and JavaScript/CSS injection
Java
8
star
15

rust-examples

Small programs written in Rust. Warm up for the upcoming Selenium Manager
Rust
7
star
16

android-examples

Sample Android apps created with Java
Java
5
star
17

selenium-jupiter-webrtc

Tests for WebRTC applications using Selenium-Jupiter
Java
5
star
18

android-basic-app

Basic Android app developed with Java
Java
5
star
19

c-examples

Basic C examples
C
4
star
20

react-native-examples

Basic apps using React Native
JavaScript
3
star
21

wdm-agent-example

Example of maven project using Selenium WebDriver and WebDriverManager as Agent
Java
3
star
22

job-tracker

Scheduled automated test for daily tracking jobs about Selenium, Cypress, Puppeteer, and Playwright on Linkedin
Java
3
star
23

test-orchestration

Jenkins library for test orchestration
Groovy
3
star
24

spark-examples

Collection of Spark examples using Python
Python
2
star
25

nodejs-examples

Node.js examples
JavaScript
2
star
26

git-intro

2
star
27

bonigarcia

Visiting Professor @UC3M, Staff Software Engineer @saucelabs, Committer @SeleniumHQ
1
star
28

nlp-examples

Natural Language Processing (NLP) examples with Python
Jupyter Notebook
1
star
29

saucelabs-fat-jars

Basic projects to illustrate how to create fat-jars with Maven and Gradle
Java
1
star
30

genai-selenium

GenAI-assisted development of Selenium tests
Java
1
star
31

nubomedia-test

NUBOMEDIA application example
Java
1
star