Skip to main content

A load testing tool

Project description

Hisar Logo

Hisar

A Load Testing Tool

Test Status License

Hisar is a fast Python-based load testing tool designed to test the performance and robustness of your APIs and web applications. With Hisar, simulate thousands of requests and evaluate system behavior under stress.

✨ Features

  • Easy to Use: Simple, intuitive command-line interface for quick load tests.
  • Highly Scalable: Test thousands of concurrent users.
  • Real-Time Metrics: View request success rates, latency, and throughput.
  • Customizable: Set custom headers, payloads, and authentication.
  • Multi-Protocol Support: HTTP/HTTPS, WebSocket, gRPC, and more.
  • Integration Ready: CI/CD integration for automated performance testing.
  • Detailed Reporting: Generate performance reports in CSV, JSON, or HTML formats.

🚀 Quick Start

Installation

You can install Hisar via pip:

pip install hisar

Basic Usage

Run a basic load test with a specified number of users and request rate:

hisar -u 100 -n 10 --url https://example.com/api
  • -u: Number of concurrent users.
  • -n: Requests per second.
  • --url: The target URL to test.

Advanced Usage

Customize headers, payloads, and authentication for more complex tests:

hisar -u 500 -n 50 \
  --headers '{"Authorization": "Bearer YOUR_TOKEN"}' \
  --data '{"key": "value"}' \
  https://example.com/api

📋 Generate Reports

Generate a detailed report after the test:

hisar -r html --output report.html https://example.com/api
  • Supported formats: csv, json, html.

🛠️ Configuration Options

Hisar offers a wide range of configuration options:

  • Concurrency: Number of concurrent users.
  • Request Rate: Number of requests per second.
  • Timeout: Set request timeout.
  • Authentication: Support for OAuth, Basic Auth, etc.
  • Payloads: Support for JSON, form-data, and more.
  • Custom Headers: Add custom request headers.

🧪 Example Test Scenarios

Scenario 1: Simple API Load Test

hisar -u 200 -n 20 https://api.yourservice.com/endpoint

Scenario 2: WebSocket Test

hisar -u 100 ws://yourservice.com/socket

Scenario 3: gRPC Test

hisar -u 50 --grpc https://grpc.yourservice.com/Service/Method

🎯 Use Cases

  • API Performance Testing: Test RESTful or gRPC APIs under heavy load.
  • WebSocket Testing: Simulate real-time connections at scale.
  • Stress Testing: Push your service to its limits and identify breaking points.
  • Automated Testing: Integrate into CI/CD pipelines to run automated performance tests.

💻 Contributing

We welcome contributions from the community! If you want to contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -m 'Add new feature').
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a Pull Request.

See the CONTRIBUTING.md for more details.

📝 License

This project is licensed under the MIT License. See the LICENSE file for more details.

Project details


Download files

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

Source Distribution

hisar-0.1.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hisar-0.1.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file hisar-0.1.0.tar.gz.

File metadata

  • Download URL: hisar-0.1.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure

File hashes

Hashes for hisar-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1bd0b9cfa007dfb42720ceaff1e9f6979d6275a61f39c233d0e52f61f59b5ebe
MD5 2d72e8c417630852d92eed50f39a9410
BLAKE2b-256 397ea73b696f39eaa98224496323aa647796f11fb0f8fcaf16f87f98205e558d

See more details on using hashes here.

File details

Details for the file hisar-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hisar-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure

File hashes

Hashes for hisar-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2231ce218009adce4b977bfc90d44be54a5a152efc4ab8bda3fc6dae4418e13f
MD5 6493b40ee6872c5475891e6d6fdb7cbf
BLAKE2b-256 1d267fde6e73226698940a8acf12cdd864bf1bf66c082ef9e2910682b088080d

See more details on using hashes here.

Supported by

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