GithubHelp home page GithubHelp logo

postman's Introduction

Postman collections for Mojaloop

1. Collections

There are 4 Postman Collections in the repository:

  • OSS-New-Deployment-FSP-Setup.postman_collection
  • Golden_Path.postman_collection
  • OSS-API-Tests.postman_collection
  • OSS-Feature-Tests.postman_collection

The first collection that needs to be run, in order to set up the database after a clean install, is OSS-New-Deployment-FSP-Setup. The sequence in which you can run the other collections after that is not important, it really depends on the type of test required.

The Golden_Path is an end-to-end regression test pack which does a complete test of all the deployed functionality. This test can be run manually but is actually designed to be run from the start, in an automated fashion, right through to the end, as response values are being passed from one request to the next.

OSS-API-Tests is a more ad-hoc and manual test pack where any request can be run to test a particular API.

OSS-Feature-Tests contains tests which isolates individual features to be tested and by implication spans one or more APIs at a time.

Import the Collections into your Postman Client:

2. Environments

Import the Environment Config and make rhe required changes to reflect the correct endpoints to the mojaloop deployment required to be tested. This environemt file contains all the required variables and placeholders needed by all the collections, but the examples for endpoints provided, point to a local mojaloop installation with the standard Ingress exposed local endpoints:

3. Testing

The collections can be run as they are via Postman but for a more detailed setup of a complete stand-alone test environment (QA and Regression Testing Framework) please refer to the detailed explanation in the Mojaloop documentation here

4. Support Scripts for Docker-compose

Script folder contains support docker-compose scripts that are to be used in conjunction with the Mojaloop Components (e.g. ml-api-adapter, central-ledger).

Refer to their respective onboarding guide for more information.

4.1 Prerequisites

Install Postman CLI Newman:

Ensure that you have NPM installed.

# Install newman
npm install -g newman

4.2 Pre-loading Test Data

Note: Ensure that you execute the following commands in your project folder after running npm install. Note: Ensure that you are in the project root folder

4.2.1 Hub Account

sh scripts/setupDockerCompose-HubAccount.sh

Or alternatively use newman directly...

# Newman command to pre-load the default Hub Account
newman run --delay-request=2000 --folder='Hub Account' --environment=environments/Mojaloop-Local-Docker-Compose.postman_environment.json OSS-New-Deployment-FSP-Setup.postman_collection.json

Example output:

OSS-New-Deployment-FSP-Setup

❏ Hub Account
↳ Add Hub Account-HUB_MULTILATERAL_SETTLEMENT
  POST http://central-ledger.local:3001/participants/Hub/accounts [201 Created, 511B, 5.4s]
  
  ...continued...

4.2.2 Onboard PayerFSP

sh scripts/setupDockerCompose-PayerFSP.sh

Or alternatively use newman directly...

# Newman command to pre-load payerfsp data
newman run --delay-request=2000 --folder='payerfsp (p2p transfers)' --environment=environments/Mojaloop-Local-Docker-Compose.postman_environment.json OSS-New-Deployment-FSP-Setup.postman_collection.json

Example output:

OSS-New-Deployment-FSP-Setup

❏ FSP Onboarding / payerfsp (p2p transfers)
↳ Add payerfsp - TRANSFERS
  POST http://central-ledger.local:3001/participants [201 Created, 642B, 5.1s]
  ✓  Status code is 201
  
  ...continued...

4.2.3 Onboard PayeeFSP

sh scripts/setupDockerCompose-PayeeFSP.sh

Or alternatively use newman directly...

# Newman command to pre-load payeefsp data
newman run --delay-request=2000 --folder='payeefsp (p2p transfers)' --environment=environments/Mojaloop-Local-Docker-Compose.postman_environment.json OSS-New-Deployment-FSP-Setup.postman_collection.json

Example output:

OSS-New-Deployment-FSP-Setup

❏ FSP Onboarding / payeefsp (p2p transfers)
↳ Add payeefsp - TRANSFERS
  POST http://central-ledger.local:3001/participants [201 Created, 642B, 5s]
  ✓  Status code is 201
  
  ...continued...

4.3 Running Example Requests

  1. Import the Golden Path Collection and Docker-compose Environment File.
    • Postman Environment: ./environments/Mojaloop-Local-Docker-Compose.postman_environment.json
    • Postman Collection: ./Golden_Path.postman_collection.json
  2. Ensure you select Mojaloop-Local-Docker-Compose from the environment drop-down
  3. Navigate to Golden_Path > p2p_money_transfer > p2p_happy_path SEND Quote > Send Transfer
  4. Click Send
  5. You can check the logs, database, etc to see the transfer state, status changes, positions and other such information.

postman's People

Contributors

mdebarros avatar nicoduvenage avatar elnyry-sam-k avatar amarmodus avatar rmothilal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.