All Projects → peterjpxie → REST_API_Test_Framework_Python

peterjpxie / REST_API_Test_Framework_Python

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

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to REST API Test Framework Python

Flasgger
Easy OpenAPI specs and Swagger UI for your Flask API
Stars: ✭ 2,825 (+6469.77%)
Mutual labels:  restful
gorest
RESTful Server Systems [DEPRECATED]
Stars: ✭ 34 (-20.93%)
Mutual labels:  restful
go-zero
A cloud-native Go microservices framework with cli tool for productivity.
Stars: ✭ 23,294 (+54072.09%)
Mutual labels:  restful
Jersey 2.x User Guide
Jersey 2.x User Guide《Jersey 2.x 用户指南》 ,中文翻译
Stars: ✭ 235 (+446.51%)
Mutual labels:  restful
Http Fake Backend
Build a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
Stars: ✭ 253 (+488.37%)
Mutual labels:  restful
bpmn-spec
A tool to run tests for BPMN processes on Zeebe
Stars: ✭ 28 (-34.88%)
Mutual labels:  test-framework
Wok
A cherrypy framework for multi-purpose plug-ins
Stars: ✭ 215 (+400%)
Mutual labels:  restful
portman
Port OpenAPI Specs to Postman Collections, inject test suite and run via Newman 👨🏽‍🚀
Stars: ✭ 530 (+1132.56%)
Mutual labels:  test-framework
tcframe
Test cases generation framework for competitive programming problems
Stars: ✭ 147 (+241.86%)
Mutual labels:  test-framework
rest
REST webservices for TYPO3 CMS
Stars: ✭ 78 (+81.4%)
Mutual labels:  restful
Clevergo
👅 CleverGo is a lightweight, feature rich and high performance HTTP router for Go.
Stars: ✭ 246 (+472.09%)
Mutual labels:  restful
Php Crud Api
Single file PHP script that adds a REST API to a SQL database
Stars: ✭ 2,904 (+6653.49%)
Mutual labels:  restful
accountbook server
📔 记账本 Django 后端
Stars: ✭ 20 (-53.49%)
Mutual labels:  restful
Tourism Demo
Flutter app backed by Redux, shows animations, internationalization (i18n), ClipPath, fonts and others...
Stars: ✭ 232 (+439.53%)
Mutual labels:  restful
NBi
NBi is a testing framework (add-on to NUnit) for Business Intelligence and Data Access. The main goal of this framework is to let users create tests with a declarative approach based on an Xml syntax. By the means of NBi, you don't need to develop C# or Java code to specify your tests! Either, you don't need Visual Studio or Eclipse to compile y…
Stars: ✭ 102 (+137.21%)
Mutual labels:  test-framework
Flask Restplus
Fully featured framework for fast, easy and documented API development with Flask
Stars: ✭ 2,585 (+5911.63%)
Mutual labels:  restful
tau
A Micro (1k lines of code) Unit Test Framework for C/C++
Stars: ✭ 121 (+181.4%)
Mutual labels:  test-framework
testza
Full-featured test framework for Go! Assertions, fuzzing, input testing, output capturing, and much more! 🍕
Stars: ✭ 409 (+851.16%)
Mutual labels:  test-framework
premiere
A simple way to consume APIs with Javascript.
Stars: ✭ 67 (+55.81%)
Mutual labels:  restful
intent
Test framework for Dotty
Stars: ✭ 14 (-67.44%)
Mutual labels:  test-framework

A RESTful API Test Framework Example

Code style: black

Features:

  • Support both functional and performance tests
  • Test by parametrized input / output text files
  • Use flask to mock API services dynamically with magic
  • HTML report
  • Common get/post/request functions to:
    1. Print every request and response in an API output file
    2. Append common headers
    3. Handle request exceptions and non-20X response codes, so you only need to focus on normal json response.

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.

HTML Report

For HTML report generation, we are using pytest-html which is simple and effective.

Other alternatives to generate fancier HTML reports are Allure and reportportal. Note these report frameworks are heavy, espcially reportportal.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].