Skip to content

kafziel4/pytest-api-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pytest API Tests

Python Pytest GitHub Actions

A sample API test automation project in Pytest, using Requests, assertpy, and pytest-html.

ReqRes

The API chosen for testing was ReqRes. It simulates how a real application behaves, is highly available and accessible from anywhere. For more information, visit their website here.

How it works

The project uses Pytest as the test framework, assertpy as the assertion library, Requests as the HTTP client to perform API requests, and pytest-html to generate HTML reports.
A workflow is set up to install Python, install the required packages, run the tests, and publish the HTML report to GitHub Pages. The report can be viewed here.

report

How to run it

  • Install Python
  • Install the project packages: pip install -r requirements.txt
  • Run the tests and generate the report: python -m pytest --html=reports/index.html

pytest

About

Sample API test automation project with Pytest

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages