Learn to write automated tests for Spring and Spring Boot Web Apps: Test With Spring course

Screencast: Unit Testing of Spring MVC Controllers – “Normal” Controllers

This is the second part of my video tutorial which describes the unit testing of Spring MVC controllers.

This video describes how we can write unit tests for “normal” controllers. A “normal” controller is (in the context of this video) a controller which either renders a view or handles form submissions.

This video will teach us four things:

  • We learn how we can get the required testing dependencies with Maven.
  • We learn what are the core components of the Spring MVC Test framework and how we can use them in our unit tests.
  • We learn to write unit tests for controller methods which renders a view.
  • We learn how we can write unit tests for controller methods which processes form submissions.

Watch The Screencast

About the Author

Petri Kainulainen is passionate about software development and continuous improvement. He is specialized in software development with the Spring Framework and is the author of Spring Data book.

About Petri Kainulainen →

0 comments… add one

Leave a Comment