[
https://issues.apache.org/jira/browse/FINERACT-2454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
James Dailey updated FINERACT-2454:
-----------------------------------
Labels: gsoc2026, mentor (was: )
> Enforce fineract-client-feign usage throughout
> ----------------------------------------------
>
> Key: FINERACT-2454
> URL: https://issues.apache.org/jira/browse/FINERACT-2454
> Project: Apache Fineract
> Issue Type: Improvement
> Reporter: James Dailey
> Priority: Minor
> Labels: gsoc2026,, mentor
>
> Summary:
> Moving away from RestAssured (low-level) API calls in integration tests and
> rather use {{fineract-client-feign}} would be a great improvement
> *Summary (with some assist from chatgpt for clarity)*
> Apache Fineract has a large set of REST APIs and many integration tests
> currently call those APIs using {*}RestAssured{*}(low-level HTTP requests).
> This ticket is to help modernize the tests by switching them to use
> {*}{{fineract-client-feign}}{*}, which is Fineract’s higher-level API client.
> h4. Goal
> Create a simple migration approach and then migrate a small set of
> integration tests from RestAssured to {{{}fineract-client-feign{}}}.
> h4. Why we’re doing this
> * Makes tests easier to read and maintain (less raw HTTP code).
> * Encourages consistent API usage across tests.
> * Reduces duplicated request-building logic (headers, base URLs, auth, etc.).
> ----
> h2. Scope of Work
> h3. 1) Create a short migration plan
> Write a short note (in the Jira ticket comments or a small doc) that answers:
> * Where are the current RestAssured-based integration tests located?
> * What’s the recommended pattern for using {{fineract-client-feign}} in
> tests?
> * What should be migrated first (start small)?
> h3. 2) Pick a small “starter set” of tests
> Identify *2–5 integration tests* that:
> * Are simple (e.g., create/read/update a resource)
> * Don’t involve complicated multi-step workflows
> * Run reliably in CI
> h3. 3) Implement the migration for the starter set
> For each selected test:
> * Replace RestAssured calls with {{fineract-client-feign}} client calls
> * Keep the same assertions (same expected behavior)
> * Ensure the tests still pass locally and in CI
> h3. 4) Document the new pattern
> Add a short README note or comments in the test code showing:
> * How to initialize/configure the Feign client for tests
> * How auth/session is handled
> * A small “before vs after” explanation (1 paragraph is enough)
> ----
> h2. Acceptance Criteria
> * A brief migration plan is written and linked in the ticket.
> * At least *2 integration tests* have been converted to use
> {{{}fineract-client-feign{}}}.
> * All tests pass (locally and/or in CI).
> * A short note exists explaining how to write future integration tests using
> {{{}fineract-client-feign{}}}.
> ----
> h2. Notes / Hints for a beginner
> * Start by converting just one very small test to learn the pattern.
> * Keep changes small and easy to review (one test per commit is ideal).
> * If something is unclear (e.g., how auth is set up), add a comment in the
> ticket describing what you found.
> ----
> h2. Out of Scope (for this ticket)
> * Migrating _all_ integration tests across the repo
> * Refactoring production API code
> * Changing API behavior—this is only a test client swap
--
This message was sent by Atlassian Jira
(v8.20.10#820010)