Skip to main content

An Automatic REST Endpoint Performance Test Generation Suite

Project description

OpenAPI Perf Logo

OpenAPI Perf

🤖 Automatic OpenAPI Performance Testing 🤖

Tests Docs Package version Python


Documentation: https://openapi-perf.awtkns.com

Source Code: https://github.com/awtkns/openapi-perf

Continous Integration: https://github.com/awtkns/openapi-perf-action


This project will make use of the OpenAPI schema to build an automated REST API performance testing and benchmarking tool. OpenAPI defines an interface for REST APIs allowing automated generation of an API schema which provides insights on the API's usage and expected input and response values. Using the OpenAPI schema we hope automatically generate tests covering all endpoints. We will use these generated tests to both test for endpoint correctness and to gather relevant performance metrics such as response time. We will finally generate an informative report on endpoint performance and correctness, allowing developers to quickly determine potentially problematic endpoints and endpoints that would benefit most from optimization.

Installation

pip install openapi-perf

Usage

Test Generation

This will create generate property-based performance tests for an endpoint and save the test schema to your results directory.

from openapi_perf import OpenAPIPerf

op = OpenAPIPerf(
  endpoint_url = "http://localhost:5000",
  results_dir = "/path/to/results/directory"
)

You can also load existing tests from a test schema file like this:

op = OpenAPIPerf(
  test_schema_path = "path/to/test_schema.json"
)

Schema files can be modified to configure test execution.

Test Execution

To run these tests, use

op.run()

This will generate a report pdf file in your results directory

For detailed usage, refer to our docs

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openapi-perf-0.0.5.tar.gz (9.2 kB view hashes)

Uploaded Source

Built Distribution

openapi_perf-0.0.5-py3-none-any.whl (12.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page