My Spring web project consists of:
- util classes;
- repositories;
- services;
- controllers.
The tests are as follows:
- unit tests for util classes;
- spring integration tests for repositories with HSQLDB;
- unit tests for services with mock repositories;
- unit tests for controllers with mock services.
There also may be system tests which test the overall project functionality. It can be performed with an external tool like Selenium or it can be performed using Spring integration testing.
The question is, should I include such spring integration system tests in a project or should they be separated somehow?
I see two problems about including system tests in a project: 1. they need configuration tuning because such tests will not run with production config (e.g. tests need a local datasource, not the one from JNDI); 2. they aren't autonomous, they need some external resources and so on. I cannot just run them as usual unit tests.
How do you organize your system testing?