Other ApplicationsStruts Resume
Set your name in
The purpose of this page is to demonstrate how to write a set of unit tests for PersonController.
The PersonControllerTest shown in SpringController is an integration test. That means that it does not isolate the code in PersonController from the rest of the application. In fact when PersonControllerTest runs, a connection is made to the database just as it would when running live.
This can be seen as good or bad. It's good because at some point, it's necessary to test that the controller really does work when integrated with the database. It's bad because it's slow and there are (???) later tests (the Canoo acceptance tests) that check the integration also, which means this is duplication of effort.