Screencast: Unit Testing of Spring MVC Controllers - Configuration

This video is outdated! If you want to learn how you can write unit tests for Spring MVC controllers, you should take a look at my updated Spring MVC Test tutorial. It describes how you can write unit tests for Spring MVC controllers with JUnit 5.

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

Before we can get our hands dirty and start writing the actual unit tests, we have to learn how we can configure unit tests which use the Spring MVC Test framework.

That is why I created this screencast.

This screencast describes how we can

  • Get the required dependencies with Maven.
  • Configure our application context in a such way that we can reuse parts of its configuration in our tests.
  • Configure our unit tests by using either the standalone configuration or the WebApplicationContext based configuration.

Watch The Screencast



7 comments… add one
  • Alexey Zvolinskiy Jul 4, 2013 @ 11:46

    Cool stuff
    Go ahead with such video tutorials

    • Petri Jul 5, 2013 @ 10:16

      Thank you for your feedback.

      I will probably try to add more interactive elements and reduce the number of slides to minimum because I feel that watching slides can be a bit boring. Let's see how that works out.

      • Jason Dec 17, 2019 @ 2:03

        No, you have it just right.
        Really, this stuff is great. Thank you.

  • Franky Jul 29, 2013 @ 11:21

    Thank you for your effort and the video tutorials.

    • Petri Jul 29, 2013 @ 11:24

      You are welcome! I am happy to hear that these tutorials were useful to you.

  • Yuvaraj Dec 21, 2014 @ 8:37

    Nice article Petri. Thnx.

    • Petri Dec 21, 2014 @ 10:13

      You are welcome!

Leave a Reply