Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Introduction1:46 with Chris Ramacciotti
In this video, I talk briefly about the content that this workshop will cover. In short, you'll learn about using the Spring testing framework to unit test a Spring MVC app, leveraging Mockito as a mocking library, and DBUnit to test our data layer.
Using Git with this Workshop
See the README on Github for information on how to use Git with this repo to follow along with this workshop.
[SOUND] Hi there, I'm Chris and
I teach Java here at tree house.
What we're going to talk about today is a unit testing a web application that was
developed using the Spring Framework.
If you've spent time in our library you may have watched Craig talk about unit
testing with JUnit that's a great place to start if you're new to unit testing
In general, you'll want to unit test an application to ensure that it does indeed
do what you intend it to do.
You can use unit test to check for boundary cases or
special cases, as well as testing that normal functionality is working.
In general, if you aren't incorporating unit tests,
you haven't done your due diligence in creating reliable software.
As far as spring is concerned you may have also spent time with me learning
about the power of the spring framework in developing scalable web applications
in our library we've used the Model View Controller pattern
to nicely separate the functionality into distinct layers.
It is especially important when writing applications in bigger frameworks like
spring, that you incorporate unit tests to ensure as much as possible,
that your code is functioning as intended.
Fortunately, spring provides a whole testing library that allows you to test
each one of these layers and includes ways for
you to incorporate the mocking of parts that don't need to be present
in their full production forms for purposes of testing.
Marking simply means faking certain functionality.
During this workshop, we’ll discuss how to test controllers, views, services and
DAOs as well as incorporate the marking of objects that are being tested directly.
All right with that said let's get to it.
You need to sign up for Treehouse in order to download course files.Sign up