From the course: Spring: Test-Driven Development with JUnit
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Test planning for @Controller components
From the course: Spring: Test-Driven Development with JUnit
Test planning for @Controller components
- [Narrator] Now it's time for us to come up with a test plan for our controller components. Just as we've done with our service components, we should have a plan on how we're going to test our controller components. Let's revisit our architecture overview, just to show where we are in our testing. We will be testing spring MVC controllers and let's go over some specifics of that plan. Just as we had to come up with some very specific ideas and objectives for our integration testing, we need to do the same for controller testing. We need to ask ourselves the same questions we asked before, however, there's one additional question you need to be asking when you're testing your controllers. You want to know if you're testing MVC style controllers, REST style controllers, or possibly both, and it really depends on your application. Just to get a bit of background, the only difference between MVC controllers and REST controllers is the output that they send back to whatever code caused…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.