https://github.com/dim-dimy4/api-postman-tests
Automated API testing project using Postman and Newman.
https://github.com/dim-dimy4/api-postman-tests
api-testing-qa newman portfolio postman test-automation
Last synced: 9 months ago
JSON representation
Automated API testing project using Postman and Newman.
- Host: GitHub
- URL: https://github.com/dim-dimy4/api-postman-tests
- Owner: dim-dimy4
- Created: 2025-06-11T15:07:40.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-06-11T15:42:59.000Z (10 months ago)
- Last Synced: 2025-06-11T17:06:39.884Z (10 months ago)
- Topics: api-testing-qa, newman, portfolio, postman, test-automation
- Language: HTML
- Homepage:
- Size: 84 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API Testing Project with Postman & Newman
This repository contains automated API tests using [JSONPlaceholder](https://jsonplaceholder.typicode.com), written in Postman and executable via Newman CLI.
The purpose is to demonstrate testing of common REST methods (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS) with assertions on status codes and response content.
---
## Covered Endpoints
| Method | Endpoint | Description |
|--------|------------------------|--------------------------------|
| `GET` | `/posts/1` | Retrieve a post by ID |
| `POST` | `/posts` | Create a new post |
| `PUT` | `/posts/1` | Full update of a post |
| `PATCH`| `/posts/1` | Partial update of a post |
| `DELETE`| `/posts/1` | Delete a post |
| `HEAD` | `/posts/1` | Check response headers |
| `OPTIONS` | `/posts` | Verify allowed HTTP methods |
---
## Tech Stack
- [Postman](https://www.postman.com/) – request management and test scripting
- [Newman](https://github.com/postmanlabs/newman) – command-line test runner
- JavaScript test assertions (inside Postman)
- HTML report generation via Newman
---
## How to Run Tests
### Prerequisites
- Node.js installed
- Newman installed globally:
```bash
npm install -g newman
```
## To install Newman
```bash
npm install -g newman-reporter-html
```
## Run the tests
```bash
newman run TestCollection.postman_collection.json
```
## Generate an HTML Report
```bash
newman run TestCollection.postman_collection.json -r html --reporter-html-export newman-report.html
```
## Example Test (in Postman)
```bash
pm.test("Status code is 200", function () {
pm.response.to.have.status(200);
});
pm.test("Response has title", function () {
const jsonData = pm.response.json();
pm.expect(jsonData).to.have.property("title");
});
```
## Project Structure
```bash
├── .gitignore
├── README.md
└── api-postman-tests/
├── TestCollection.postman_collection.json
└── newman-report.html
```
## Notes
This project uses a `.gitignore` file (Node.js template) to avoid tracking unnecessary files if extended in future.
## Contacts
E-mail: kachuk.mail@gmail.com
LinkedIn: [Dmytro Kachuk](https://www.linkedin.com/in/dmytro-kachuk-289628206/)