Cosmic Module

O

Qubits of DPK

March 23, 2026

Core Open Source
Layer: Layer 9 — The App Shell
Full end-to-end integration test suite running against a live Fineract server + database.
This is where all 4 of your GSoC PRs live:
  • PR #5658 — InstanceModeIntegrationTest
  • PR #5659 — ClientExternalIdTest + 2 others
  • PR #5668 — LoanWithdrawnByApplicantIntegrationTest
  • PR #5670 — ClientLoanAccountLockIntegrationTest
All migrations are under: integration-tests/src/test/java/org/apache/fineract/integrationtests/

What This Module Is (Big Picture)

The integration-tests module validates that the entire Apache Fineract system works correctly when all modules run together.
Unlike unit tests that test individual classes, integration tests verify real system behavior.
These tests simulate real workflows such as:
  • creating a client
  • creating a loan
  • approving a loan
  • making repayments
  • generating reports
The module interacts with the system through real API calls.

Layman Example

Suppose we want to verify that the loan system works correctly.
Instead of manually testing it through the UI, an automated test performs the entire workflow.
Example test flow:
  1. #
    Create a client
  2. #
    Create a loan for that client
  3. #
    Approve the loan
  4. #
    Disburse the loan
  5. #
    Make a repayment
The test checks whether each step works correctly.
The integration-tests module automates these validations.

Where the Code Lives

The tests simulate real application usage.

Key Package

org.apache.fineract.integrationtests
Responsibilities include:
  • testing system workflows
  • validating API behavior
  • verifying database changes
  • ensuring system modules work together

Example Integration Test

A typical integration test verifies a complete workflow.
Example test:
java
QUBITS OF DPK
1@Test
2public void testLoanLifecycle() {
3
4    Long clientId = clientApi.createClient(clientRequest);
5
6    Long loanId = loanApi.createLoan(loanRequest);
7
8    loanApi.approveLoan(loanId);
9
10    loanApi.disburseLoan(loanId);
11
12    loanApi.makeRepayment(loanId, repaymentRequest);
13
14    assertLoanStatus(loanId, "ACTIVE");
15}
This test verifies the entire loan lifecycle.

Test Environment

Integration tests run against a real running instance of Fineract.
Test setup typically includes:
  • starting the application server
  • connecting to a test database
  • executing API calls
The tests verify that the system behaves correctly under real conditions.

Example Test Flow

java
QUBITS OF DPK
1Integration Test
2Call Client API
34Fineract Server
5Create client
67Database
8Store client record
910Integration Test
11Verify client created
This ensures the system works from API → Service → Database.

Test Categories

Integration tests often cover:
These tests ensure critical system workflows remain stable.

Example Workflow Test

Example: Client and loan creation test.
java
QUBITS OF DPK
1Test Runner
2Start test
34Create Client API
5POST /v1/clients
67Create Loan API
8POST /v1/loans
910Approve Loan API
11POST /v1/loans/{id}?command=approve
1213Verify loan status

Why This Module Matters

Integration tests ensure:
  • system stability
  • correct module interaction
  • reliable API behavior
  • safe software updates
They are critical for preventing regressions when code changes.

One-Sentence Summary

integration-tests provides end-to-end automated tests that validate real workflows and ensure all Apache Fineract modules work together correctly.