This repository consists of API Automation using Axios, Mocha and JavaScript. I have automated the user creation for Customer and Agent, also some transaction-related operations have been done, ex- Send Money, Agent To Customer Deposit, Money Withdrawal, Customer Payment, etc. Also, assertion and negative test cases have been covered for every test case.
Do the following steps using the API from this collection: https://api.postman.com/collections/1844288-143eb923-423f-4c91-a198-fe6e56d20e35?access_key=PMAT-01GJ3CC22Q0066PJWP3T0XHQ8G
- Do Login by admin
- Create 2 new customers and an agent
- Give 2000 tk from the System account to the newly created agent
- Deposit 1500 tk to a customer from the agent account
- Withdraw 500 tk by the customer to the agent
- Send money 500 tk to another customer
- Payment of 100 tk to a merchant (01686606905) by the recipient customer
- Check the balance of the recipient customer
- Clone This project
- open the cloned project in vs code
- Type npm install in Terminal and Hit Enter
- Then Hit the following command in terminal
npm test
- JavaScript
- VS Code
- Chai Mocha
- Axios
- Mocha Awsome report
- Check that the user can not log in with invalid credentials
- Check that the user can successfully log in with valid credentials
- Check that user1/customer1 creation is not possible with an invalid phone number
- Check that user1/customer1 can be created with valid credentials
- Check that user2/customer2 can be created with valid credentials
- Check that agent creation is not possible with an invalid phone number
- Check that agent can be created with valid credentials
- Check that it is not possible to deposit money from the system account to the agent account with the wrong agent number
- Check that it is possible to do the successful deposit of money from the system account to the agent account
- Check that it is not possible to deposit money from the agent account to the wrong customer 1 account
- Check that it is possible to successfully deposit money from the agent account to the correct customer 1 account
- Check that it is possible to successfully withdraw money from customer 1 account to a correct agent account
- Check that it is not possible to send money from customer 1 account to the wrong customer 2 account
- Check that it is possible to successfully send money from customer 1 account to a correct customer 2 account
- Check that it is possible to do a successful payment from the customer 2 account to a valid agent account
- Check that it is possible to successfully check customer 2 account balance