Skip to content

Instantly share code, notes, and snippets.

@Attumm
Created November 9, 2023 10:57
Show Gist options
  • Save Attumm/706081f0ca7d04e45c1384b986f973ba to your computer and use it in GitHub Desktop.
Save Attumm/706081f0ca7d04e45c1384b986f973ba to your computer and use it in GitHub Desktop.

Medusa: API Testing and Performance Tool

Medusa is a versatile command-line tool designed for developers working on API services. It provides functionalities to capture, replay, and test API calls, enhancing your workflow and ensuring the stability and performance of your services.

Features

Capture API Calls

When developing or maintaining APIs, Medusa allows you to capture API calls and their responses. This feature is particularly useful when fixing bugs or adding new features. By preserving the order of calls, you can analyze and compare results, facilitating regression testing and performance analysis.

./medusa -mode proxy

Replay Captured Calls

Easily replay the API calls captured by the proxy to validate the correctness and performance of your changes.

./medusa -mode replay

Caching for Offline Work

For APIs only available on production machines or within secure networks, Medusa offers a caching mode. By storing API results, you can continue working even without internet connectivity.

./medusa -mode caching

Check Correctness

Medusa acts as a proxy and checks if the new output matches the previous one, simplifying the creation of regression tests.

./medusa -mode correctness

Performance Testing

Employ Medusa's performance testing capabilities by running multiple workers to replay captured data and obtain a comprehensive performance overview.

./medusa -mode performance -worker 5

Customization

Modify API calls by editing the captured log. Tailor the data to your needs, ensuring flexibility in your testing process. ing the tool's capabilities.

License

Medusa is licensed under the MIT License - see the LICENSE file for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment