KRYSTALM7 opened a new pull request, #57: URL: https://github.com/apache/fineract-loan-origination/pull/57
## FINERACT-2442: Cucumber Integration Tests ### Summary Adds backend integration tests using Cucumber + Testcontainers covering the two core workflows of the Loan Origination System: customer authentication and multi-stage loan approval. JIRA: [FINERACT-2442](https://issues.apache.org/jira/browse/FINERACT-2442) ### Test Coverage **Customer Authentication** (`customer-auth.feature`) - Valid credentials → 200 with JWT token - Wrong password → 401 - Unknown username → 401 **Multi-Stage Loan Approval** (`loan-approval.feature`) - Loan Officer approves → status stays UNDER_REVIEW - Credit Committee approves → status stays UNDER_REVIEW - Branch Manager approves final stage → status moves to APPROVED - Any stage rejects → status moves to REJECTED ### Infrastructure - Cucumber 7.18.0 + cucumber-spring for Spring context integration - Testcontainers PostgreSQL 15 (`@ServiceConnection`) for real DB - RestAssured for HTTP-layer assertions on auth scenarios - Full Spring Boot context with `RANDOM_PORT` and Fineract mock enabled ### Dependencies Added - `io.cucumber:cucumber-java:7.18.0` - `io.cucumber:cucumber-spring:7.18.0` - `io.cucumber:cucumber-junit-platform-engine:7.18.0` - `org.junit.platform:junit-platform-suite` - `io.rest-assured:rest-assured:5.4.0` ### Test Results (149 existing unit tests + 7 new Cucumber scenarios) ### Notes - Depends on #54 (staff auth and workflow config) - Yet to write tests for frontend. ## Checklist - [x] I have read the Apache Fineract Contributing Guidelines. - [x] My pull request is linked to the correct JIRA ticket number. - [x] My commit message follows the `FINERACT-<issue-no> - <issue-desc>` format. - [x] I have manually verified the documentation changes. - [x] I have verified that the project builds successfully. ## Method of Testing **Automated** - `./mvnw verify` runs all 156 tests including Cucumber scenarios - Testcontainers spins up a real PostgreSQL instance for each run ## Build Commands ```bash ./mvnw verify ``` <img width="1393" height="800" alt="image" src="https://github.com/user-attachments/assets/1d42335f-057d-4589-a67b-85b4ca29136e" /> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
