Tested an API using Mocha and axios framework by user interaction and created mochawesome report
- Install Nodejs latest version
- Install VS code latest version
- Call login API
- Create a new customer and an agent
- Search by the customer phone number
- Deposit 5000 tk to the Agent from system
- Deposit 2000 tk by agent to customer
- Check balance of customer
- Check statement by trnxId
- Withdraw 1000 tk by customer and assert expected balance
- Send 500 tk to another customer and assert expected balance
- Check customer statement
- Clone the repo
- Open termianl in the root folder
- Give following commands:
npm init -y
npx mocha --timeout=30000 test\user.test.js
npx mocha --timeout=30000 test\trx.test.js
To create mochawesome report, give following commands:
npm i mochawesome
npm test file ./test/*.test.js
https://docs.google.com/spreadsheets/d/1IPLXcD-1KWsA7kg4IsEP5YtJCJLZsrELXkIZLLNKAYk/edit?usp=sharing