How should I test my code?

There are different kinds of tests that we can perform on a piece of software, such as security tests, performances test, and so on. As developers, we will focus on the tests we can automate and that will help improve our code.

The tests fall under two categories: unit tests and acceptance tests. The test pyramid (http://martinfowler.com/bliki/TestPyramid.html) shows in what proportions these tests should be written:

How should I test my code?

At the bottom of the pyramid, you have the unit tests (fast to launch and relatively easy to maintain), and at the top, UI tests (costlier and slower to execute). Integration tests sit in the middle: they can ...

Get Spring MVC: Designing Real-World Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.