Tagged articles
JUnit5
12 articles · Page 1 of 1
This guide walks through setting up Spring Boot 3.x with JDK 17+, adding Actuator and test dependencies, and implementing a comprehensive JUnit 5 test suite that validates health endpoint aggregation, status priority, show‑details configuration, custom endpoints, JVM metrics, endpoint exposure, health groups, and custom HTTP status mapping, with instructions for running the tests via Maven or an IDE.
ActuatorJDK 17JUnit5
0 likes · 17 min read

This article explains unit testing fundamentals, compares unit and integration tests, introduces Mockito's core annotations and APIs, walks through a full order‑resend example with detailed test cases, and covers best‑practice methodologies, advanced techniques, common pitfalls, naming conventions, and how to run the tests.
Given-When-ThenJUnit5Java
0 likes · 21 min read

The article introduces JUnit's @AutoClose annotation (added in version 5.11), compares the traditional @BeforeEach/@AfterEach cleanup pattern with the annotation's automatic resource closing, and demonstrates its use across file I/O, database connections, HTTP clients, streams, and custom AutoCloseable classes, including warning behavior for null fields.
@AutoCloseJUnitJUnit5
0 likes · 8 min read

This guide walks through setting up a Spring Boot 3.x project with JDK 17+, adding the necessary Maven dependencies, and implementing a comprehensive JUnit 5 test suite that demonstrates @Cacheable, @CachePut, @CacheEvict (single‑key and all‑entries), SpEL‑based keys, condition/unless caching, and the AOP proxy pitfall of same‑class calls, plus instructions for running the tests via Maven or IntelliJ IDEA.
CacheJUnit5Java
0 likes · 19 min read

SpringBoot integration tests load the full application context to verify end‑to‑end behavior, while unit tests only cover isolated methods; this guide explains @SpringBootTest fundamentals, configuration options, MockMvc usage, test structure, common pitfalls, and best practices for reliable full‑stack testing.
JUnit5MockMvcSpring Boot
0 likes · 26 min read

This guide explains how backend developers can combine Postman for fast manual debugging with JUnit 5 automated tests to ensure API correctness, handle token authentication, run batch requests, and avoid common pitfalls in SpringBoot projects.
API testingJUnit5MockMvc
0 likes · 8 min read

This article provides a comprehensive guide to Spring Boot testing, covering core utilities, essential annotations, dependency libraries, web environment configurations, and practical code examples for unit, slice, and integration tests across JUnit, MockMvc, TestRestTemplate, JPA, Redis, and REST client scenarios.
JUnit5MockMvcdatajpa
0 likes · 14 min read

This article explains what unit testing is, why it is essential for software quality, outlines its benefits such as early bug detection and design improvement, and provides practical guidance on writing effective Java unit tests using JUnit5, Mockito, and JaCoCo, along with CI integration and best‑practice principles.
CI/CDJUnit5JaCoCo
0 likes · 28 min read

This article examines common unit‑testing problems in Java projects, analyzes their root causes such as development and maintenance costs, and presents practical solutions including choosing JUnit5, leveraging Mockito, using in‑memory databases, and employing a custom IntelliJ plugin to automatically generate test code and test data.
JUnit5JavaMockito
0 likes · 18 min read

This article explains why developers should switch from JUnit4 to JUnit5, outlines the JUnit5 architecture, shows how to add the proper Maven dependency, and provides practical examples of common annotations, assertions, repeated, parameterized, and nested tests for Spring Boot projects.
JUnit5JavaSpring Boot
0 likes · 7 min read

This article explains the major changes in Spock 2.0 M1, how to integrate it with JUnit 5 via the JUnit Platform, provides step‑by‑step Gradle and Maven configurations, discusses compatibility issues with Groovy versions, and offers solutions for JUnit 4 Rule migration.
GradleJUnit5Java Testing
0 likes · 6 min read

This tutorial explains how to use Selenium's built‑in PageFactory to implement the Page Object pattern, defines a TodoMVC API, provides JUnit 5 test examples, shows a concrete Page implementation with @FindBy annotations, discusses additional locator annotations, element lookup timing, and demonstrates running the tests from the command line.
JUnit5JavaPage Object
0 likes · 11 min read
