Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 1.46 KB

README.md

File metadata and controls

26 lines (16 loc) · 1.46 KB

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