O'Reilly logo

Spring Boot Cookbook by Alex Antonov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating tests for Spring MVC Controllers

In the previous chapters, we made a lot of progress in gradually creating our application; but how do we know that it actually does what we want it to do? More importantly, how do we know for sure that after six months, or even a year from now, it will still continue to do what we expected it to do at the very beginning? This question is best answered by creating a set of tests, preferably automated, that run a suite of assertions against our code. This ensures that we constantly get the same and expected outputs given the specific inputs. Having tests gives us the much needed peace of mind that our application is not only elegantly coded and looks beautiful, but it also performs reliably and is as much ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required