Skip to content

Building & Testing

This document outlines the standard Gradle commands and testing strategies across CIS modules.


1. Compilation & Full Builds

The project uses Gradle 8.10+ wrapper for reproducible builds.

# Compile all sources (offline mode supported)
.\gradlew.bat compileJava --offline

# Full build skipping test suite execution
.\gradlew.bat build -x test --offline

2. Running Test Suites

CIS test suites are categorized into: - Unit & Slice Tests: Fast tests running in memory with @WebMvcTest or RestTestClient. - Integration Tests: Comprehensive authentic tests utilizing Docker Testcontainers for Oracle 23, Redis 7.4, and OpenLDAP.

# Run tests for a specific module
.\gradlew.bat :cis-auth:test
.\gradlew.bat :cis-bff:test
.\gradlew.bat :cis-api:test

# Run all tests across the repository
.\gradlew.bat test

[!TIP] Running tests that use Testcontainers requires Docker to be running locally. Testcontainers will automatically spin up isolated containers and tear them down after test completion.


3. Code Coverage with JaCoCo

Coverage is monitored via JaCoCo across all subprojects.

# Generate JaCoCo coverage report for a specific module
.\gradlew.bat :cis-bff:jacocoTestReport
# Output report: cis-bff/build/reports/jacoco/test/html/index.html

# Generate unified aggregate coverage report across the entire repository
.\gradlew.bat jacocoRootReport
# Output report: build/reports/jacoco/jacocoRootReport/html/index.html

Coverage Targets

  • Target Line Coverage: > 90%
  • Target Instruction Coverage: > 90%
  • All new controllers must use Spring's modern RestTestClient asserting HTTP status, headers, and body structures via AssertJ.