Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shakhawat1998/mocha-axios-api-automation-assignment
https://github.com/shakhawat1998/mocha-axios-api-automation-assignment
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/shakhawat1998/mocha-axios-api-automation-assignment
- Owner: Shakhawat1998
- Created: 2024-11-05T20:05:12.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-05T20:28:14.000Z (2 months ago)
- Last Synced: 2024-11-05T21:30:02.094Z (2 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Project Title: API Automation of Dmoney Transactions Using Mocha and Axios
## Project Summary
This project demonstrates API automation for the Dmoney platform using Mocha, Axios, and the MochaAwesome report. The automation covers a series of transactions to verify system behavior, including user login, customer and agent creation, fund transfers, and balance verification.# Tools and Technologies
- **Node.js**: JavaScript runtime for executing server-side scripts.
- **Integrated Development Environment (IDE)**: Visual Studio Code (VS Code) for code development and debugging.
- **Axios**: HTTP client used to send asynchronous HTTP requests to REST endpoints.
- **Chai**: Assertion library for writing behavior-driven tests.
- **JavaScript Faker**: Library to generate fake data for testing.
- **MochaAwesome Report**: Reporting tool to create detailed test reports.
- **Mocha**: Test framework used to structure and run automated API tests.## Key Features
1. **Admin Login**
- Log in as an admin using credentials `[email protected]/1234`.2. **User Creation**
- Automatically create two new customers and one agent account.3. **System-to-Agent Deposit**
- Deposit 2000 tk from the system account to the newly created agent.4. **Agent-to-Customer Deposit**
- Deposit 1500 tk from the agent's account to a specific customer account.5. **Customer Withdrawal**
- Withdraw 500 tk from a customer account back to the agent account.6. **Customer-to-Customer Transfer**
- Send 500 tk from one customer to another customer account.7. **Customer Payment to Merchant**
- Complete a payment of 100 tk from a customer to a specified merchant.8. **Balance Check**
- Verify the balance of the recipient customer to ensure transaction accuracy.
## How to Run This Project:- Clone this project.
- Give following command in terminal
- ```bash
npm init -y
- Give following command to run end-to-end test along with mochawesome report generation
- ```bash
npm test## Mochawesome Report
![mocha-report part 1](https://github.com/user-attachments/assets/38f932c1-054d-46af-bd44-bb6acc98a92f)
![mocha-report part 2](https://github.com/user-attachments/assets/2c96d753-96fd-4333-82db-e1a5cc700930)