Skip to main content

17 docs tagged with "testing"

View all tags

Integration Tests

How to use @SpringBootTest with TestRestTemplate and WebTestClient to write full-context Spring Boot integration tests.

Integration Tests — Practical Demo

Hands-on walkthrough of @SpringBootTest with TestRestTemplate, @MockBean for external dependencies, and Testcontainers for real database integration.

JUnit 5

The foundational Java testing framework — lifecycle annotations, assertions, parameterized tests, and test organization.

JUnit 5 — Practical Demo

Hands-on code examples and step-by-step walkthroughs for JUnit 5 lifecycle, assertions, and parameterized tests.

Mockito

How to create mock objects, stub method calls, verify interactions, and capture arguments in Java unit tests.

Mockito — Practical Demo

Hands-on code examples for creating mocks, stubbing behavior, verifying interactions, and capturing arguments with Mockito.

MockMvc & WebTestClient

How to test Spring MVC and Spring WebFlux controllers at the HTTP level without starting a real server, using MockMvc and WebTestClient.

Spring Boot Interview Questions

Consolidated interview Q&A for Spring Boot covering auto-configuration, properties, starters, Actuator, and testing — beginner through advanced.

Spring Boot Test Slices

How to use @WebMvcTest, @DataJpaTest, and @JsonTest to write fast, focused Spring Boot tests that load only the layers you need.

Spring Boot Testing

How to test Spring Boot applications using @SpringBootTest, test slices (@WebMvcTest, @DataJpaTest), @MockBean, and Testcontainers for integration tests with real infrastructure.

Testcontainers

How to use Testcontainers to run real PostgreSQL, MySQL, Redis, and Kafka instances inside Docker containers during Java tests.

Testcontainers — Practical Demo

Hands-on examples for running PostgreSQL, Redis, and Kafka in Docker containers during tests, with Spring Boot 3.1+ @ServiceConnection.

Testing Interview Questions

Consolidated interview Q&A for Java Testing covering JUnit 5, Mockito, Spring Boot test slices, integration tests, Testcontainers, MockMvc, and WebTestClient.

Testing Overview

Quick-reference summary of Java testing concepts — JUnit 5, Mockito, Spring Boot test slices, integration tests, Testcontainers, MockMvc, and WebTestClient.

Testing Strategy

How LoanApplicationService is unit-tested with JUnit 5 and Mockito — covering risk classification, EMI calculation, and all eligibility rules using @Nested test classes.