Skip to content

shekrj/API-Testing-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Testing Project

Project Goal

This project demonstrates API testing using Python (Pytest), Postman, and Jira for bug tracking.
The goal is to validate JSONPlaceholder API endpoints and log any issues in Jira.


Tools Used

  • Python 3.12.5
  • Pytest — automation framework for testing APIs
  • Requests — Python library to send HTTP requests
  • Postman — manual API testing and collection
  • Jira — bug tracking and workflow management

Project Structure

api-testing-project/
├── tests/
│ └── test_posts_api.py # Pytest automation scripts
├── postman/
│ └── jsonplaceholder.postman_collection.json # Manual API collection
├── docs/
│ └── jira-bug-example.png # Screenshot of a Jira bug
├── requirements.txt # Python dependencies
└── README.md

API Endpoints Tested

  1. GET /posts/1 — Positive test (status 200)
  2. GET /posts/999 — Negative test (status 404)
  3. POST /posts — Create a post (status 201)
  4. PUT /posts/1 — Update a post (status 200)
  5. PATCH /posts/1 — Partial update (status 200)
  6. DELETE /posts/1 — Delete post (status 200/404)

Postman Collection

  • Base URL is defined as a variable: {{baseURL}}
  • Each request has a simple status code test in Postman’s Tests tab
  • Collection exported as: postman/jsonplaceholder.postman_collection.json

Pytest Automation

  • All tests are in tests/test_posts_api.py
  • Positive and negative test scenarios are included
  • Run tests locally using:

bash pip install -r requirements.txt pytest


  • Sample output:
tests/test_posts_api.py::test_get_post PASSED
tests/test_posts_api.py::test_get_nonexistent_post PASSED
tests/test_posts_api.py::test_create_post PASSED
tests/test_posts_api.py::test_update_post PASSED
tests/test_posts_api.py::test_patch_post PASSED
tests/test_posts_api.py::test_delete_post PASSED 

Jira Bug Tracking ->

  • Bugs are logged in Jira for each failing scenario;
  • Screenshot attached in docs/jira-bug-example.png

Example bug: Jira Bug Example

  • Summary: GET /posts/999 API response validation issue
  • Steps: Call GET /posts/999
  • Expected: Status 404
  • Actual: Response returned empty object

How to Use ->

  • Clone or download the repository
  • Install dependencies: pip install -r requirements.txt
  • Run Pytest tests: pytest
  • Import Postman collection if you want manual testing
  • Check docs/ for Jira bug screenshot

Notes ->

  • This project demonstrates API testing skills for QA / SDET roles

  • Base URL variable ensures requests are reusable

  • Positive and negative tests included

  • Postman and Pytest provide manual + automated coverage

About

API testing project using Pytest, Postman, and Jira

Topics

Resources

Stars

Watchers

Forks

Languages