Clarifying Unit vs Integration Tests in storage Module (JDBC + Mockito vs Dataset Tests)

Hey everyone,
I’ve noticed that in the `storage test package, we currently have a mix of:

  • Spring + DBUnit integration tests (using BaseWebContextSensitiveTest), and
  • Pure Mockito-based unit tests that mock EntityManager, Session, and Query for DAO classes.

From what I understand, we have been favoring dataset-driven integration tests over mocked persistence tests as a culture.

Before I proceed with refactoring the storage tests following an issue of migrating and removing JDBC/Mockito-based DAO tests, I’d like confirmation on:

  • Should all storage persistence tests be converted to pure integration tests only?
  • Is it acceptable to delete and replace Mockito-based DAO tests with dataset-backed DAO integration tests?

This will help ensure we align with the project’s intended testing philosophy and avoid future inconsistency.
@Moses_Mutesasira @mherman22

1 Like

Thanks @Agaba_Derrick_Junior for the catch.
we would want to follw our existing integration tests structure and also want to avoid mocking services as much as we can since they habour errors

1 Like