Collection of Postman API test suites with automated execution using Newman CLI and GitHub Actions CI/CD integration.
This repository contains 5 API test collections:
- Assignment #1 -
Assignment #1.postman_collection.json - Assignment #2 -
Assignment #2.postman_collection.json - Assignment #3 -
Assignment #3.postman_collection.json - Assignment #4 -
Assignment #4.postman_collection.json - Assignment #5 -
Assignment #5.postman_collection.json
- ✅ Automated API Testing - Pre-configured test scripts
- ✅ Newman CLI Integration - Run collections from command line
- ✅ CI/CD Ready - GitHub Actions workflows included
- ✅ Test Assertions - Request/response validation
- ✅ Environment Support - Configurable for different environments
- Open Postman application
- Click Import
- Select any
.postman_collection.jsonfile - Click Import
- Run the collection
Prerequisites:
- Node.js installed
- Newman installed:
npm install -g newman
Run a collection:
# Run Assignment #1
newman run "Assignment #1.postman_collection.json"
# Run with HTML report
newman run "Assignment #1.postman_collection.json" -r html
# Run with environment file
newman run "Assignment #1.postman_collection.json" -e environment.jsonCollections automatically run via GitHub Actions on:
- Push to main branch
- Pull requests
- Manual trigger
Postman/
│
├── .github/workflows/
│ ├── postman.yml # Postman collection runner
│ └── test.yml # Test automation workflow
│
├── Assignment #1.postman_collection.json
├── Assignment #2.postman_collection.json
├── Assignment #3.postman_collection.json
├── Assignment #4.postman_collection.json
├── Assignment #5.postman_collection.json
│
└── README.md
- Postman - API testing tool
- Newman - Command-line collection runner
- GitHub Actions - CI/CD automation
- Node.js - Runtime for Newman
The GitHub Actions workflows automatically:
- Install Newman
- Run all collections
- Generate test reports
- Upload artifacts
- Notify on failures
newman
Assignment #1
→ GET Request Example
GET https://api.example.com/users [200 OK, 1.2KB, 345ms]
✓ Status code is 200
✓ Response contains user data
┌─────────────────────────┬────────────┬───────────┐
│ │ executed │ failed │
├─────────────────────────┼────────────┼───────────┤
│ iterations │ 1 │ 0 │
├─────────────────────────┼────────────┼───────────┤
│ requests │ 5 │ 0 │
├─────────────────────────┼────────────┼───────────┤
│ test-scripts │ 10 │ 0 │
├─────────────────────────┼────────────┼───────────┤
│ assertions │ 15 │ 0 │
└─────────────────────────┴────────────┴───────────┘- Create/export collection from Postman
- Save as
.postman_collection.json - Add to repository
- Update this README
- Commit and push
- Write clear test descriptions
- Use environment variables for dynamic values
- Add pre-request scripts for setup
- Include comprehensive assertions
- Organize requests logically
Sumit Narang
- LinkedIn: linkedin.com/in/sumit-narang15
- GitHub: @snnarangsumit
This project is available for reference and learning purposes.
⭐ If you find these collections helpful, please give this repo a star!