Skip to content

kawsar-95/api-testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DMoney API Automation Assignment

Batch No: 15
Topic: API Testing
Portal Link: http://dmoneyportal.roadtocareer.net
Admin Login: admin@roadtocareer.net / 1234


📋 Assignment Scenario

This project automates the DMoney API scenario using Postman and Newman.
It covers the following workflow:

  1. Admin creates:

    • An Agent
    • 2 random Customers
    • A Merchant
  2. SYSTEM deposits money to Agent

  3. Agent deposits money to a Customer

  4. Check Agent's balance

  5. Customer sends money to another Customer

  6. Customer withdraws money to Agent

  7. Check Customer's balance and transaction statement by trnxId

  8. Second Customer makes a payment to Merchant

  9. Second Customer checks balance and transaction statement

  10. Merchant checks their balance

All requests use the authentication header:
X-AUTH-SECRET-KEY: ROADTOSDET


📁 Project Structure

.
├── DMoney/
│   └── dmoney.json           # Postman collection
├── Reports/
│   └── report.html           # Newman HTML report
├── package.json
├── package-lock.json
├── report.js                 # (Optional) Newman runner script
└── README.md

✅ Task Breakdown

1. Create Test Cases

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

2. Create Postman Collection

  • All 10 scenarios automated in DMoney/dmoney.json
  • Negative test cases included for each request

3. Generate Newman Report

  • Collection exported and run with Newman
  • HTML report generated at Reports/report.html

4. Generate Postman Documentation

5. Add Newman Report Screenshot

Below is a screenshot from the Newman HTML report:

Newman HTML Report Screenshot

Open Reports/report.html in your browser for the full interactive report.


🚀 How to Run

  1. Install dependencies:

    npm install
  2. 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
  3. View the Report:

    • Open Reports/report.html in your browser.

🧪 Dependencies


📄 License

ISC


📎 Reference


📊 Example Newman HTML Report

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published