Tagged articles
10 articles
Page 1 of 1
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 21, 2025 · Backend Development

Mastering Spring Boot Controller Tests: 8 Powerful Techniques

This article presents a comprehensive guide to testing Spring Boot controller layers, covering isolated @WebMvcTest, full‑stack @SpringBootTest, WebTestClient, TestRestTemplate, standalone MockMvc, REST Assured, exception‑handling advice, and pure Mockito unit tests, each with purpose, core annotations, sample code, pros, cons, and usage recommendations.

Controller TestingIntegration TestJUnit
0 likes · 20 min read
Mastering Spring Boot Controller Tests: 8 Powerful Techniques
Java Architect Essentials
Java Architect Essentials
Jul 1, 2025 · Backend Development

Why Postman Fails and MockMvc Wins: Real‑World API Testing Secrets

This article recounts a midnight production outage caused by inadequate Postman tests, explains three hidden pitfalls of Postman, demonstrates how MockMvc provides precise, code‑level assertions and automated scenarios, and offers a step‑by‑step guide to boost API test automation from 30% to 90% coverage.

BackendJavaMockMvc
0 likes · 9 min read
Why Postman Fails and MockMvc Wins: Real‑World API Testing Secrets
Programmer DD
Programmer DD
Feb 25, 2021 · Backend Development

Master Spring Boot Unit Testing with MockMvc: A Complete Guide

This article explains the fundamentals of unit testing in Spring Boot, covering the purpose of unit tests, how to add the spring-boot-starter-test dependency, the role of MockMvc for controller testing, step‑by‑step creation of Service and Controller test classes, key annotations, assertion techniques, and a brief comparison with Postman.

Backend DevelopmentJUnitJava
0 likes · 13 min read
Master Spring Boot Unit Testing with MockMvc: A Complete Guide
Top Architect
Top Architect
Jan 12, 2021 · Backend Development

Introduction to Mock Testing with Spring MVC and MockMvc

This article introduces mock testing for Spring MVC controllers, explains why mocks are useful, describes the main MockMvc components, shows required Maven dependencies, and provides complete example test cases for both view‑returning and JSON‑returning endpoints using JUnit and MockMvc.

BackendJUnitJava
0 likes · 8 min read
Introduction to Mock Testing with Spring MVC and MockMvc
Programmer DD
Programmer DD
Jan 9, 2021 · Backend Development

How to Write Unit Tests for File Upload APIs in Spring Boot

This guide shows backend developers how to write unit tests for file‑upload endpoints in Spring Boot using MockMvc, including a complete example with MockMultipartFile and emphasizing test‑driven design for better code quality.

JavaMockMvcSpring Boot
0 likes · 4 min read
How to Write Unit Tests for File Upload APIs in Spring Boot
Programmer DD
Programmer DD
Oct 23, 2019 · Backend Development

Master Spring Boot Testing: Unit and Integration Tests with JUnit, Hamcrest, and MockMvc

This tutorial walks through writing and running unit and integration tests for a Spring Boot application, covering JUnit and Hamcrest assertions, Maven setup, model definitions, service and controller implementations, MockMvc usage, and both mocked and real‑world test scenarios, complete with sample code and output.

HamcrestIntegration TestJUnit
0 likes · 25 min read
Master Spring Boot Testing: Unit and Integration Tests with JUnit, Hamcrest, and MockMvc