mojaloop / ml-core-test-harness

Can be used to spin-up mojaloop and make test transfers (P2P, etc) using TTK. This repo can also be used for functional tests in the core services.
5 stars 9 forks source link

[DMP 2024]: Mojaloop participation tools enhancement #3861 #61

Open elnyry-sam-k opened 5 months ago

elnyry-sam-k commented 5 months ago

Ticket Contents

Description

There is a need to enhance, support and maintain the Mojaloop participation tools periodically. Usual maintenance and evolution to support new needs doesn’t take priority as commercial teams or teams with grants and projects focus on specific features only as required by business needs.

The Mojaloop participation tool set that includes tools such as the Mojaloop Testing Toolkit, the “Core test harness”, Miniloop, IaC need some maintenance to keep them up-to-date and enhancements to make them user friendly (to devs, qa, infra members) to use and for demonstrations for business and product users.

Goals & Mid-Point Milestone

Goals

Setup/Installation

Details in implementation details

Expected Outcome

Acceptance Criteria

No response

Implementation Details

Mockups/Wireframes

No response

Product Name

Mojaloop participation tools enhancement

Organisation Name

Mojaloop

Domain

Financial Inclusion

Tech Skills Needed

CI/CD, DevOps, Docker, JavaScript, Microservices, Node.js, React

Mentor(s)

Sam Kummary, James Bush, Paul Makin and other SMEs, community contributors as necessary

Category

Accessibility, Beginner Friendly, CI/CD, Delpoyment, Testing

elnyry-sam-k commented 5 months ago

Weekly Goals

Week 1

Week 2

Week 3

docker-compose.yml mojaloop/ml-core-test-harnes

Week 4

Week 5

Week 6

Week 7

devarsh10 commented 4 months ago

Weekly Learnings and Updates

Week 1 [11/06/2024 - 14/06/2024]

Week 2 [17/06/2024 - 21/06/2024]

Week 3

Week 4 [01/07/2024 - 06/07/2024]

Week 5 [08/07/2024 - 13/07/2024]

Week 6 [15/07/2024 - 20/07/2024]

Week 7 [22/07/2024 - 27/07/2024]

Week 8 [29/07/2024 - 03/08/2024]

Week 9 [05/08/2024 - 10/08/2024]

Updates

  1. Had a meeting with the senior developers and we came to a few conclusions as follows,
    • Raise a PR at the Management-API GitHub repo so we can see the test coverage there.
    • Following it, take a look at IaC and Helm which will help you to better understand Management-API and Experience-API.
  2. I have raised the PR. But we see no Actions were triggered. Link to the PR: Link

    Referred Central ledger and made some progress [08/08/2024]

  3. So, as of now, the management-API repository is lacking the following things,
    • Test coverage command in package.json
    • .nycrc.yml file with required configuration.
    • So, I added them and made some progress. But, yet to walk a long way. The coverage summary still shows a 0% result
    • You can refer to this Video Document I created for more information related to test-coverage. I also mentioned important files required for creating test coverage.

Learnings

  1. Learned about Vault and Redis.
  2. Refer the central-ledger repository for better understanding of Test Coverage.
  3. Learned about Test Coverage.

Week 10 [12/08/2024 - 17/08/2024]

Updates

  1. Successfully able to get the test cases.[15/08/2024]
  2. I have referred a few other Mojaloop repositories and concluded that we don't need the nyc(Istanbul) package to get the text summary. So, I have done this(refer to the attached image-01) in jest.config.js, and along with it, I added the text summary in the coverageReporters(image-01) which will give us the Text-Summary(image-02). Hence, we can now start focusing on, taking the threshold from 60% to 90% coverage.

Image-01: image Imaeg-02: image

  1. Now, the focus is to make the test coverage 90%.

Learnings

  1. Watched the video lecture on jest on "How to write test cases?". Link to Lecture -> JavaScript Testing with Jest – Crash Course
  2. I learned more about the Jest testing framework. Link-01 Link-02

Week 11 [19/08/2024 - 25/08/2024]

Updates

  1. As of now I have learned and gained some knowledge about the jest framework. I have started implementing this jest framework in two more repositories. Link-01 to PR Link-02 to PR.[21/08/2024]

Learnings

  1. Alongside getting started with the IaC Project. Sam(our mentor) has organized a meeting for us with Nathan who explained to us what IaC is and how it is leveraged at Mojaloop and described all the small components referring this repository.[21/08/2024]
  2. Learned about Netmaker, Lens
  3. Educated me about Terraform configurations, Vault, and the ingress controller.
  4. What I had done on the GitHub CodeSpaces once I forked the ML-deployment-guide is -> I had installed terraform, configured aws followed this Blog, and followed the guide.

Week 12 [26/08/2024 - 31/08/2024]

Updates

  1. During this week we're getting started with the IaC projects and working on Transaction Request Service.
  2. In IaC project, the objective is clear that we've to get some extensions and gaps clear, once I deploy the IaC locally.
  3. Following that, in CTH our main objective is to add the service for Transaction Request Service. Here, we'll, create the service say trs-requests and all the containers will run regarding it. Done(Edit).
  4. Now, after the point 3, the new objective is to add the /transactionRequest API request should reach to TTK Endpoint.

Learnings

  1. During this week I have learned about, how the IaC is Implemented at Mojaloop and why it is useful at Mojaloop? and What problem IaC is solving?
  2. Learned about CRD, How the Finance Portal works at mojaloop. Learned about the "Merchant requests for payment" system and few API calls and routes related to it. Like, /trasactionRequests and many others. Link to resources: BizOps Payee Initiated Transaction
  3. On friday, connected with Paul Baker and Sam where, Paul taught me how can we add the Finance Portal with Core-Test-Harness.

Week 12 [02/09/2024 - 07/09/2024]

Updates

  1. The goal of this week is to, get started with Finance Portal with Core Test Harness.
  2. What tries I have done yet is,
    • Deployed Finance Portal UI locally, using Docker and helm charts.
    • Deployed all the components which Paul Baker taught during the call and integrated them to see how they perform.
    • After, above steps the main components I come up with is this.
    • In total there are 5 to 6 components which plays mojar role in Finance portal. Like, 1 2 3 read more....

Learnings

  1. The learnings, I took during this week are, I got to learn about how the helm chart works.
  2. I got used to the docker-compose file and it's terms like volumes, networks, profile and got introduced with small but necessary new terms like, user:root inside docker-compose file.