Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JsonPlaceholder API Test Framework

A small API testing project built with python, PyTest and JSON Schema for practising CRUD, contract and negative testing against JSONPlaceholder.

Features

  • API Client: Wrapped requests implementation in conftest.py to abstract the base URLs and make the codebase cleaner while calling routes.
  • Contract Testing: Uses JSON Schema (Draft-07) to ensure responses from the API match the expected data types and structure, catching "silent" backend type coercion bugs.
  • Advanced PyTest Logic:
    • Fixtures: Modular setup for clients and loading JSON schemas.
    • Parametrization: Used to test multiple invalid inputs in payloads while adhering to DRY principles.
    • XFAIL Tracking: Used to highlight "silent" backend bugs where the api should fail yet doesn't.
  • Negative Testing Covers typical negative tests such as 404 Not Found and 400 Bad Request.

Installation & Setup

  1. Clone the repo:

	git clone
  1. Install Dependencies

	pip install -r requirements.txt
  1. Run the tests!

	pytest

About

A small API testing project built with python, PyTest and JSON Schema for practising CRUD, contract and negative testing against JSONPlaceholder.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages