[
https://issues.apache.org/jira/browse/FINERACT-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Krishna Mewara updated FINERACT-2649:
-------------------------------------
Description:
Migrate all *118 loan integration tests* currently extending
{{BaseLoanIntegrationTest}} to extend {{{}FeignLoanTestBase{}}}, replacing
REST-assured HTTP calls with the typed Feign client. This eliminates
REST-assured as a test dependency for loan tests and aligns with the project's
long-term goal of full Feign client adoption.
*Current state:*
* 118 test classes extend {{BaseLoanIntegrationTest}} (REST-assured)
* 11 test classes already extend {{FeignLoanTestBase}} (Feign)
* {{FeignLoanTestBase}} covers ~60% of the base class API surface
*Target state:*
* 0 test classes extend {{BaseLoanIntegrationTest}}
* All loan tests use the typed Feign client
* {{BaseLoanIntegrationTest}} can be deleted or deprecated
h3. Approach
Split into *3 batch PRs* ordered by infrastructure dependency complexity:
||PR||Tests||Scope||
|PR1 |5 tests|Simple lifecycle tests - no GL accounting, no charges, no
advanced features|
|PR2|55 tests|Tests needing charges, chargebacks, chargeoff, reschedule,
cumulative loans, fraud, business events|
|PR3|58 tests|Tests needing GL journal verification, external asset owner, COB,
inline COB, batch API, point-in-time|
was:
Migrates 5 Tier 1 loan integration tests from {{BaseLoanIntegrationTest}}
(REST-assured) to {{FeignLoanTestBase}} (Feign client).
h3. Migrated tests
* {{LoanPrepayAmountTest}}
* {{LoanProductWithChargeOffBehaviourTest}}
* {{LoanInterestRateFrequencyTest}}
* {{LoanDueCalculationTest}}
* {{FixedLengthLoanProductIntegrationTest}}
h3. Infrastructure additions
* Added {{retrieveLoanProduct}} and {{updateLoanProduct}} (typed) to
{{FeignLoanHelper}}
* Added {{FeignRawHttpHelper}} for sending raw JSON when explicit null values
are needed (the {{NON_NULL}} ObjectMapper prevents typed null serialization)
* Added loan product templates to {{LoanProductTemplates}}
({{{}onePeriod30DaysPeriodicAccrual{}}},
{{{}fourPeriod1MonthWithoutInterest{}}}, {{{}create4IProgressive{}}})
* Added request builders to {{LoanRequestBuilders}} ({{{}applyLoanRequest{}}},
{{{}applyLP2ProgressiveLoanRequest{}}}, {{approveLoan}} with expected
disbursement date)
* Added schedule and transaction validators to {{LoanTestValidators}}
* Extended {{FeignLoanTestBase}} with convenience wrappers (product builders,
installment/transaction factories)
* Centralized {{ISO_DATE_PATTERN}} constant in {{FeignTestConstants}} /
{{LoanTestData}}
h3. Bug fixes
* {{FeignClientHelper.createClient()}} — use fixed past activation date
matching {{ClientHelper.DEFAULT_DATE}}
* {{FeignBusinessDateHelper}} — added overloads accepting explicit
{{dateFormat}} parameter
* {{FeignLoanTestBase.runAt()}} / {{updateBusinessDate()}} — auto-detect date
format so migrated and existing tests remain compatible
> Batch Migrate BaseLoanIntegrationTest Importers to FeignLoanTestBase
> --------------------------------------------------------------------
>
> Key: FINERACT-2649
> URL: https://issues.apache.org/jira/browse/FINERACT-2649
> Project: Apache Fineract
> Issue Type: Improvement
> Components: Test
> Reporter: Krishna Mewara
> Assignee: Krishna Mewara
> Priority: Trivial
> Labels: feign-migration
>
> Migrate all *118 loan integration tests* currently extending
> {{BaseLoanIntegrationTest}} to extend {{{}FeignLoanTestBase{}}}, replacing
> REST-assured HTTP calls with the typed Feign client. This eliminates
> REST-assured as a test dependency for loan tests and aligns with the
> project's long-term goal of full Feign client adoption.
> *Current state:*
> * 118 test classes extend {{BaseLoanIntegrationTest}} (REST-assured)
> * 11 test classes already extend {{FeignLoanTestBase}} (Feign)
> * {{FeignLoanTestBase}} covers ~60% of the base class API surface
> *Target state:*
> * 0 test classes extend {{BaseLoanIntegrationTest}}
> * All loan tests use the typed Feign client
> * {{BaseLoanIntegrationTest}} can be deleted or deprecated
> h3. Approach
> Split into *3 batch PRs* ordered by infrastructure dependency complexity:
> ||PR||Tests||Scope||
> |PR1 |5 tests|Simple lifecycle tests - no GL accounting, no charges, no
> advanced features|
> |PR2|55 tests|Tests needing charges, chargebacks, chargeoff, reschedule,
> cumulative loans, fraud, business events|
> |PR3|58 tests|Tests needing GL journal verification, external asset owner,
> COB, inline COB, batch API, point-in-time|
--
This message was sent by Atlassian Jira
(v8.20.10#820010)