Skip to content

REST API Test Framework example using Python requests and flask for both functional and performance tests.

License

Notifications You must be signed in to change notification settings

sanogotech/REST_API_Test_Framework_Python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A RESTful API Test Framework Example

Features:

  • Support both functional and performance tests

  • Common get/post function to

  1. Print every request and response in a API output file
  2. Append common headers
  3. Take care of request exception and non-200 response codes and return None, so you only need to care normal json response.
  • Use flask to mock API services dynamically with magic

  • html report

Install:

pip install -r Scripts/requirements.txt

Run:

cd Scripts

Start API mock services:

python flask_mock_service.py

Run Functional tests:

pytest

Run Performance tests:

python perf_test_rest_api.py

Medium Post

Check out the medium post for more details.

About

REST API Test Framework example using Python requests and flask for both functional and performance tests.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.6%
  • Other 0.4%