[
https://issues.apache.org/jira/browse/FINERACT-2609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Krishna Mewara updated FINERACT-2609:
-------------------------------------
Description:
h2. Overview
Migrate Fineract's integration test infrastructure from raw RestAssured HTTP
calls to the type-safe Feign client ({{{}fineract-client-feign{}}}). This is an
incremental migration following the [Strangler Fig
pattern|https://martinfowler.com/bliki/StranglerFigApplication.html] — new
Feign helpers coexist alongside legacy RestAssured helpers, with tests migrated
one-by-one.
To close: FINERACT-2454
h2. Current State
||Metric||Count||
|Total helper files in {{common/}}|123|
|Helpers with RestAssured only (unmigrated)|53|
|Helpers with both RestAssured + Retrofit (mixed)|18|
|Helpers already using Retrofit ({{{}Calls.ok{}}})|35|
|Helpers with NO RestAssured (pure utility)|51|
|Total test files (excluding {{common/}} and Feign)|312|
|Test files directly importing RestAssured|197 of 312 (63%)|
|Existing Feign test files|10|
|Existing Feign helpers|17|
|Existing Feign modules|7|
|Existing wrapper interfaces|4|
h2. Migration Tiers
h3. Tier 1 — High-Impact
||Helper||Importers||RestAssured %||
|{{Utils.java}}|309|100%|
|{{ClientHelper.java}}|216|~80%|
|{{BaseLoanIntegrationTest.java}}|121|~95%|
|{{LoanTransactionHelper.java}}|118|~55%|
|{{SavingsAccountHelper.java}}|37|~97%|
h3. Tier 2 — Medium-Impact
||Helper||Importers||
|{{BusinessDateHelper}}|61|
|{{AccountHelper}}|60|
|{{ChargesHelper}}|55|
|{{DelinquencyBucketsHelper}}|36|
|{{SchedulerJobHelper}}|35|
|{{GlobalConfigurationHelper}}|26|
|{{JournalEntryHelper}}|24|
|{{OfficeHelper}}|19|
|{{GroupHelper}}|17|
h3. Tier 3 — Low-Impact / Niche
{{BatchHelper}} (7 importers), {{{}WorkingCapitalLoanHelper{}}},
{{{}FixedDepositAccountHelper{}}}, {{{}RecurringDepositAccountHelper{}}}, plus
domain-specific helpers with <10 importers each.
h3. Foundation Layer
{{Utils.java}} (309 importers) — the RestAssured gateway that nearly all
helpers delegate to. This is the *last* thing to deprecate, only after all
helpers above are migrated.
h2. Architecture Pattern
New {{FeignXxxHelper}} classes live under {{{}client/feign/helpers/{}}}. They:
* Take {{FineractFeignClient}} via constructor injection
* Use {{ok(() -> ...)}} for API calls (via {{FeignCalls}} utility)
* Tests extend {{FeignIntegrationTest}} base class
* Share the same model classes ({{{}org.apache.fineract.client.models.*{}}})
as Retrofit
Legacy and Feign helpers coexist. Both {{fineract-client}} (Retrofit) and
{{fineract-client-feign}} are on the classpath simultaneously. The {{exclude}}
in {{dependencies.gradle}} prevents duplicate model classes.
h2. Key Design Decisions
# *Separate Feign Helper Classes* to keep tests clean and easy to fully
migrate.
# *Both clients share model classes*
# *Thin wrapper interfaces* only for the most-used APIs with unreadable
generated names.
# *Coexistence over replacement*
h2. PR Roadmap
h3. Core PRs
||PR||Scope||Child Ticket||Status||
|PR 1|{{FeignSavingsHelper}} + first savings test| |{color:#ff0000}Not
Started{color}|
h3. Stretch PRs (if time permits)
||PR||Scope||Stretch Outcome||
| | | |
h2. Progress Log
_Updated after each PR merge._
||Date||PR||Ticket||Notes||
| | | | |
was:
h2. Overview
Migrate Fineract's integration test infrastructure from raw RestAssured HTTP
calls to the type-safe Feign client ({{{}fineract-client-feign{}}}). This is an
incremental migration following the [Strangler Fig
pattern|https://martinfowler.com/bliki/StranglerFigApplication.html] — new
Feign helpers coexist alongside legacy RestAssured helpers, with tests migrated
one-by-one.
To close: FINERACT-2454
h2. Current State
||Metric||Count||
|Total helper files in {{common/}}|123|
|Helpers with RestAssured only (unmigrated)|53|
|Helpers with both RestAssured + Retrofit (mixed)|18|
|Helpers already using Retrofit ({{{}Calls.ok{}}})|35|
|Helpers with NO RestAssured (pure utility)|51|
|Total test files (excluding {{common/}} and Feign)|312|
|Test files directly importing RestAssured|197 of 312 (63%)|
|Existing Feign test files|10|
|Existing Feign helpers|17|
|Existing Feign modules|7|
|Existing wrapper interfaces|4|
h2. Migration Tiers
h3. Tier 1 — High-Impact
||Helper||Importers||RestAssured %||
|{{Utils.java}}|309|100%|
|{{ClientHelper.java}}|216|~80%|
|{{BaseLoanIntegrationTest.java}}|121|~95%|
|{{LoanTransactionHelper.java}}|118|~55%|
|{{SavingsAccountHelper.java}}|37|~97%|
h3. Tier 2 — Medium-Impact
||Helper||Importers||
|{{BusinessDateHelper}}|61|
|{{AccountHelper}}|60|
|{{ChargesHelper}}|55|
|{{DelinquencyBucketsHelper}}|36|
|{{SchedulerJobHelper}}|35|
|{{GlobalConfigurationHelper}}|26|
|{{JournalEntryHelper}}|24|
|{{OfficeHelper}}|19|
|{{GroupHelper}}|17|
h3. Tier 3 — Low-Impact / Niche
{{BatchHelper}} (7 importers), {{{}WorkingCapitalLoanHelper{}}},
{{{}FixedDepositAccountHelper{}}}, {{{}RecurringDepositAccountHelper{}}}, plus
domain-specific helpers with <10 importers each.
h3. Foundation Layer
{{Utils.java}} (309 importers) — the RestAssured gateway that nearly all
helpers delegate to. This is the *last* thing to deprecate, only after all
helpers above are migrated.
h2. Architecture Pattern
New {{FeignXxxHelper}} classes live under {{{}client/feign/helpers/{}}}. They:
* Take {{FineractFeignClient}} via constructor injection
* Use {{ok(() -> ...)}} for API calls (via {{FeignCalls}} utility)
* Tests extend {{FeignIntegrationTest}} base class
* Share the same model classes ({{{}org.apache.fineract.client.models.*{}}})
as Retrofit
Legacy and Feign helpers coexist — no Big Bang. Both {{fineract-client}}
(Retrofit) and {{fineract-client-feign}} are on the classpath simultaneously.
The {{exclude}} in {{dependencies.gradle}} prevents duplicate model classes.
h2. PR Roadmap
h3. Core PRs
||PR||Scope||Child Ticket||Status||
|PR 1|{{FeignSavingsHelper}} + first savings test| |{color:#FF0000}Not
Started{color}|
h3. Stretch PRs (if time permits)
||PR||Scope||Stretch Outcome||
| | | |
h2. Progress Log
_Updated after each PR merge._
||Date||PR||Ticket||Notes||
| | | | |
> Migrate integration test helpers from RestAssured to Feign client
> -----------------------------------------------------------------
>
> Key: FINERACT-2609
> URL: https://issues.apache.org/jira/browse/FINERACT-2609
> Project: Apache Fineract
> Issue Type: Improvement
> Reporter: Krishna Mewara
> Priority: Trivial
> Labels: feign-migration, test-infrastructure
>
> h2. Overview
> Migrate Fineract's integration test infrastructure from raw RestAssured HTTP
> calls to the type-safe Feign client ({{{}fineract-client-feign{}}}). This is
> an incremental migration following the [Strangler Fig
> pattern|https://martinfowler.com/bliki/StranglerFigApplication.html] — new
> Feign helpers coexist alongside legacy RestAssured helpers, with tests
> migrated one-by-one.
> To close: FINERACT-2454
> h2. Current State
> ||Metric||Count||
> |Total helper files in {{common/}}|123|
> |Helpers with RestAssured only (unmigrated)|53|
> |Helpers with both RestAssured + Retrofit (mixed)|18|
> |Helpers already using Retrofit ({{{}Calls.ok{}}})|35|
> |Helpers with NO RestAssured (pure utility)|51|
> |Total test files (excluding {{common/}} and Feign)|312|
> |Test files directly importing RestAssured|197 of 312 (63%)|
> |Existing Feign test files|10|
> |Existing Feign helpers|17|
> |Existing Feign modules|7|
> |Existing wrapper interfaces|4|
> h2. Migration Tiers
> h3. Tier 1 — High-Impact
> ||Helper||Importers||RestAssured %||
> |{{Utils.java}}|309|100%|
> |{{ClientHelper.java}}|216|~80%|
> |{{BaseLoanIntegrationTest.java}}|121|~95%|
> |{{LoanTransactionHelper.java}}|118|~55%|
> |{{SavingsAccountHelper.java}}|37|~97%|
> h3. Tier 2 — Medium-Impact
> ||Helper||Importers||
> |{{BusinessDateHelper}}|61|
> |{{AccountHelper}}|60|
> |{{ChargesHelper}}|55|
> |{{DelinquencyBucketsHelper}}|36|
> |{{SchedulerJobHelper}}|35|
> |{{GlobalConfigurationHelper}}|26|
> |{{JournalEntryHelper}}|24|
> |{{OfficeHelper}}|19|
> |{{GroupHelper}}|17|
> h3. Tier 3 — Low-Impact / Niche
> {{BatchHelper}} (7 importers), {{{}WorkingCapitalLoanHelper{}}},
> {{{}FixedDepositAccountHelper{}}}, {{{}RecurringDepositAccountHelper{}}},
> plus domain-specific helpers with <10 importers each.
> h3. Foundation Layer
> {{Utils.java}} (309 importers) — the RestAssured gateway that nearly all
> helpers delegate to. This is the *last* thing to deprecate, only after all
> helpers above are migrated.
> h2. Architecture Pattern
> New {{FeignXxxHelper}} classes live under {{{}client/feign/helpers/{}}}. They:
> * Take {{FineractFeignClient}} via constructor injection
> * Use {{ok(() -> ...)}} for API calls (via {{FeignCalls}} utility)
> * Tests extend {{FeignIntegrationTest}} base class
> * Share the same model classes ({{{}org.apache.fineract.client.models.*{}}})
> as Retrofit
> Legacy and Feign helpers coexist. Both {{fineract-client}} (Retrofit) and
> {{fineract-client-feign}} are on the classpath simultaneously. The
> {{exclude}} in {{dependencies.gradle}} prevents duplicate model classes.
> h2. Key Design Decisions
> # *Separate Feign Helper Classes* to keep tests clean and easy to fully
> migrate.
> # *Both clients share model classes*
> # *Thin wrapper interfaces* only for the most-used APIs with unreadable
> generated names.
> # *Coexistence over replacement*
> h2. PR Roadmap
> h3. Core PRs
> ||PR||Scope||Child Ticket||Status||
> |PR 1|{{FeignSavingsHelper}} + first savings test| |{color:#ff0000}Not
> Started{color}|
> h3. Stretch PRs (if time permits)
> ||PR||Scope||Stretch Outcome||
> | | | |
> h2. Progress Log
> _Updated after each PR merge._
> ||Date||PR||Ticket||Notes||
> | | | | |
--
This message was sent by Atlassian Jira
(v8.20.10#820010)