You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 4
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.
eyJleHRTcnZJbnRlZ1R5cGUiOiIiLCJnQ2xpZW50SWQiOiIiLCJjcmVhdG9yTmFtZSI6IlJ1c2xhbiBLYXNoYXBvdiIsIm91dHB1dFR5cGUiOiJibG9jayIsImxhc3RNb2RpZmllck5hbWUiOiJSdXNsYW4gS2FzaGFwb3YiLCJsYW5ndWFnZSI6ImVuIiwiZGlhZ3JhbURpc3BsYXlOYW1lIjoiIiwic0ZpbGVJZCI6IiIsImF0dElkIjoiOTMwMDQ3MDUiLCJkaWFncmFtTmFtZSI6IkNQUyBEQiBUZXN0aW5nIFVuaXQgdnMgSW50ZWdyYXRpb24iLCJhc3BlY3QiOiIiLCJsaW5rcyI6ImF1dG8iLCJjZW9OYW1lIjoiQ1BTIFBlcnNpc3RlbmNlIGxheWVyIHRlc3RpbmciLCJ0YnN0eWxlIjoiaW5saW5lIiwiY2FuQ29tbWVudCI6ZmFsc2UsImRpYWdyYW1VcmwiOiIiLCJjc3ZGaWxlVXJsIjoiIiwiYm9yZGVyIjpmYWxzZSwibWF4U2NhbGUiOiIxIiwib3duaW5nUGFnZUlkIjo5MzAwNDU3NCwiZWRpdGFibGUiOmZhbHNlLCJjZW9JZCI6OTMwMDQ3MTQsInBhZ2VJZCI6IiIsImxib3giOmZhbHNlLCJzZXJ2ZXJDb25maWciOnsiZW1haWxwcmV2aWV3IjoiMSJ9LCJvZHJpdmVJZCI6IiIsInJldmlzaW9uIjoyLCJtYWNyb0lkIjoiYTk5YjgyMGUtNTk5ZC00NDJjLWFhZTYtMWQ0NzM1Yzg5MmI1IiwicHJldmlld05hbWUiOiJDUFMgREIgVGVzdGluZyBVbml0IHZzIEludGVncmF0aW9uLnBuZyIsImxpY2Vuc2VTdGF0dXMiOiJPSyIsInNlcnZpY2UiOiIiLCJpc1RlbXBsYXRlIjoiIiwid2lkdGgiOiI3NDEiLCJzaW1wbGVWaWV3ZXIiOmZhbHNlLCJsYXN0TW9kaWZpZWQiOjE2MDk3NDc1NTgwMDAsImV4Y2VlZFBhZ2VXaWR0aCI6ZmFsc2UsIm9DbGllbnRJZCI6IiJ9
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,
database driver and database itself) remain not involved (not tested)
Test Containers
Test container life circle management
Database initialization notes
@SpringBootTest
Test template
Resources