Skip to content

Testing Standards & Strategy

Testing across CIS microservices emphasizes automated verification, fast feedback loops, and authentic environment fidelity.


Testing Pyramid

pie title CIS Test Distribution
    "Unit & Web Slice Tests (RestTestClient / MockMvc)" : 65
    "Integration Tests (Testcontainers Oracle / Redis / LDAP)" : 30
    "Contract & End-to-End Tests" : 5

Guides & References

  • Integration Testing Guide: Detailed configuration and patterns for Docker Testcontainers (Oracle 23, Redis 7.4, OpenLDAP).
  • Build & Test Guide: Gradle commands for slice tests, offline test execution, and JaCoCo coverage reports.

Testing Principles

  1. RestTestClient for Web Slices: In Spring Boot 4.1.2 (Spring Framework 7), prefer RestTestClient over raw MockMvc for cleaner, fluent assertions and seamless alignment with modern HTTP client testing.
  2. AssertJ Fluent Assertions: Always prefer AssertJ assertions (assertThat(...)) over JUnit 5 assertions for rich failure diagnostics.
  3. No Mocks for Critical Infrastructure: Database, Redis token revocation, and LDAP queries must be validated against real Testcontainers instances in integration test suites.