© Jorge Acetozi 2017

Jorge Acetozi, Pro Java Clustering and Scalability, https://doi.org/10.1007/978-1-4842-2985-9_25

25. Integration Tests

Jorge Acetozi

(1)São Paulo / SP, Brazil

Integration tests are not as straightforward to code as unit tests because they really need to test an entire integration. For example, to test a database integration, you would need to set up this database before running the tests.

To address this issue and avoid the overhead of setting up an entire database just for executing a simple test, many people run integration tests with an in-memory database such as H2.1

The point here is that integration tests are more effective when running in an environment similar to the production environment. For example, an in-memory database ...

Get Pro Java Clustering and Scalability: Building Real-Time Apps with Spring, Cassandra, Redis, WebSocket and RabbitMQ 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.