Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Table Of Contents

Addresses:

  • CPS-95 - Getting issue details... STATUS
  • CPS-124 - Getting issue details... STATUS
  •   CPS-128 - Getting issue details... STATUS

Overview

The CPS-RI module which is responsible for data persistence and retrieval from the database is based on
Spring Data framework. Following components are used:

  • Persistence service implementations (logic layer) → these are defined as Java classes
  • JPA repositories (data access layer) → these are defined as Java interfaces, corresponding objects
    are created by Spring framework at runtime

In order to reach the desirable level of reliability it's expected the functionality to be covered with tests.

While using unit tests is a common approach for Java application testing, it seems insufficient  in a context of testing the
actual data persistence/retrieval functionality:

  • Test covers a small slice of functionality while the major piece served by external services (Spring data framework,
    JDBC driver and database itself) remain not used (not tested)
  • JPA repositories can be only used as mocks to test the service implementation, 



Test Containers

Test container life circle management

Database initialization notes


@SpringBootTest


Test template


Resources

  • No labels