Batch No: 15
Topic: API Testing
Portal Link: http://dmoneyportal.roadtocareer.net
Admin Login: admin@roadtocareer.net / 1234
This project automates the DMoney API scenario using Postman and Newman.
It covers the following workflow:
-
Admin creates:
- An Agent
- 2 random Customers
- A Merchant
-
SYSTEM deposits money to Agent
-
Agent deposits money to a Customer
-
Check Agent's balance
-
Customer sends money to another Customer
-
Customer withdraws money to Agent
-
Check Customer's balance and transaction statement by trnxId
-
Second Customer makes a payment to Merchant
-
Second Customer checks balance and transaction statement
-
Merchant checks their balance
All requests use the authentication header:
X-AUTH-SECRET-KEY: ROADTOSDET
.
├── DMoney/
│ └── dmoney.json # Postman collection
├── Reports/
│ └── report.html # Newman HTML report
├── package.json
├── package-lock.json
├── report.js # (Optional) Newman runner script
└── README.md
At least 15 test cases were written, covering all positive and negative scenarios.
Each test case includes:
- Test Case ID
- Test Title
- Steps
- Expected Result
- All 10 scenarios automated in
DMoney/dmoney.json - Negative test cases included for each request
- Collection exported and run with Newman
- HTML report generated at
Reports/report.html
Below is a screenshot from the Newman HTML report:
Open
Reports/report.htmlin your browser for the full interactive report.
-
Install dependencies:
npm install
-
Run Newman with HTML Extra Reporter:
npx newman run DMoney/dmoney.json -r htmlextra --reporter-htmlextra-export Reports/report.html
Or, if using a custom runner:
node report.js
-
View the Report:
- Open
Reports/report.htmlin your browser.
- Open
ISC
The following is a preview of the generated HTML report:
Click to expand report preview
- Total Requests: 37
- Failed Tests: 0
- Skipped Tests: 0
- All scenarios passed successfully
Assignment Completed by:
Nuruddin Kawsar
Batch 15