Spring Boot 4 Testing / Part 1YOUTUBE PLAYER LOADS ON PLAYThe App, HTTP and Spring Boot 3
Springboot Testing #1

Spring Boot Testing Tutorial for Beginners: The App, HTTP and Boot 3 vs 4

Spring Boot 4 Testing3 Nov 20263:31Open on YouTube

In this lesson

Before we write a single test, let's meet the app we will test, and see it running. A small cinema booking app: pick a show, give your name and the number of seats, and it books them.

Episode 0 of Spring Boot Testing: the complete guide. Start here.

  • The app: a cinema booking service (Starfall, 7:30 PM, Rs 200 a seat, 4 or more seats get 10% off)
  • Inside it, four floors: controller, service, repository, database
  • HTTP in plain words: method, path, body, status code
  • No screen of its own: a website or app would send the request; we send it with curl
  • The real app on PostgreSQL 17: 201 Created, 200 OK, 400 Bad Request, 404 Not Found, 409 Conflict
  • The versions in every episode: Java 21, Spring Boot 4.1.2, Spring Framework 7.0, JUnit 6, AssertJ, Mockito 5, Testcontainers 2, PostgreSQL 17, Maven 3.9
  • Spring Boot 3 vs 4: Framework 7, Jakarta EE 11, spring-boot-starter-webmvc, @MockBean is gone (@MockitoBean), the split test starters, new packages for test annotations
  • The plan for Episodes 1 to 7

Built and run on Spring Boot 4.1, Java 21, JUnit 6, Mockito 5, Testcontainers 2.0, PostgreSQL 17.

Keep going

More walkthroughs.