Running Embedded Container Tests

Learn how to run tests in an embedded container in Spring Boot.

So far, we’ve written a domain object test and a service test. That’s a good start, but sometimes we need to test things on a grander scale. For example, verifying that our web controller can properly interact with a back-end service may have greater value.

End-to-end testing our web controller

Historically, carrying out this type of end-to-end test has required one of the following options:

  1. Stand up an expensive testbed and use a team of test engineers to manually exercise our application for every change. We also risk our test procedures not keeping up with supported features.

  2. Write a slew of complex test cases that attempts to automate web pages, but fall apart when the slightest change occurs.

Get hands-on with 1400+ tech skills courses.