grizzly-loadtester


Namegrizzly-loadtester JSON
Version 2.10.1 PyPI version JSON
download
home_pageNone
SummaryTraffic generator based on locust and behave
upload_time2024-04-26 11:08:50
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords locust behave load loadtest performance traffic generator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Grizzly - `/ˈɡɹɪzli/`

<img align="right" src="https://raw.githubusercontent.com/Biometria-se/grizzly/main/docs/content/assets/logo/grizzly_grasshopper_brown_256px.png" alt="grizzly logo">
<span>

###### Framework

![PyPI - License](https://img.shields.io/pypi/l/grizzly-loadtester?style=for-the-badge)
![PyPI](https://img.shields.io/pypi/v/grizzly-loadtester?style=for-the-badge)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/grizzly-loadtester?style=for-the-badge)

###### Command Line Interface

![PyPI - License](https://img.shields.io/pypi/l/grizzly-loadtester-cli?style=for-the-badge)
![PyPI](https://img.shields.io/pypi/v/grizzly-loadtester-cli?style=for-the-badge)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/grizzly-loadtester-cli?style=for-the-badge)

###### Editor Support / Language Server
![PyPI - License](https://img.shields.io/pypi/l/grizzly-loadtester-ls?style=for-the-badge)
![PyPI](https://img.shields.io/pypi/v/grizzly-loadtester-ls?style=for-the-badge)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/grizzly-loadtester-ls?style=for-the-badge)

###### Editor Support / Visual Studio Code Extension
![GitHub License](https://img.shields.io/github/license/Biometria-se/grizzly-lsp?style=for-the-badge)
![Visual Studio Marketplace Version (including pre-releases)](https://img.shields.io/visual-studio-marketplace/v/biometria-se.grizzly-loadtester-vscode?style=for-the-badge)
![Visual Studio Marketplace Release Date](https://img.shields.io/visual-studio-marketplace/release-date/biometria-se.grizzly-loadtester-vscode?style=for-the-badge)
</span>

**Grizzly is a framework to be able to easily define load scenarios, and is primarily built on-top of two other frameworks.**

> [Locust](https://locust.io): Define user behaviour with Python code, and swarm your system with millions of simultaneous users.

> [Behave](https://behave.readthedocs.io/): Uses tests written in a natural language style, backed up by Python code.

**`behave` is <del>ab</del>used for being able to define `locust` load test scenarios using [gherkin](https://cucumber.io/docs/gherkin). A feature can contain more than one scenario and all scenarios will run in parallell. This makes it possible to implement load test scenarios without knowing python or how to use `locust`.**

[Locust](https://en.wikipedia.org/wiki/Locust) are a group of certain species of short-horned grasshoppers in the family Arcididae that have a swarming phase.

The name grizzly was chosen based on the grasshopper [Melanoplus punctulatus](https://en.wikipedia.org/wiki/Melanoplus_punctulatus), also known as __grizzly__ spur-throat grasshopper. This species [prefers living in trees](https://www.sciencedaily.com/releases/2005/07/050718234418.htm) over grass, which is a hint to [Biometria](https://www.biometria.se/)<sup>1</sup>, where `grizzly` originally was created.

<sup>1</sup> _Biometria is a member owned and central actor within the swedish forestry that performs unbiased measurement of lumber flowing between forest and industry so that all of Swedens forest owners can feel confident selling their lumber._

## Documentation

More detailed documentation can be found [here](https://biometria-se.github.io/grizzly) and the easiest way to get started is to check out the [example](https://biometria-se.github.io/grizzly/example/).


## Features

A number of features that we thought `locust` was missing out-of-the-box has been implemented in `grizzly`.

### Test data

Support for synchronous handling of test data (variables). This is extra important when running `locust` distributed and there is a need for each worker and user to have unique test data, that cannot be re-used.

The solution is heavily inspired by [Karol Brejnas locust experiments - feeding the locust](https://medium.com/locust-io-experiments/locust-experiments-feeding-the-locusts-cf09e0f65897). A producer is running on the master (or local) node and keeps track of what has been sent to the consumer running on a worker (or local) node. The two communicates over a dedicated [ZeroMQ](https://zeromq.org) connection.

When the consumer wants new test data, it sends a message to the server that it is available and for which scenario it is going to run. The producer then responds with unique test data that can be used.

### Statistics

Listeners for both InfluxDB and Azure Application Insights are included. The later is more or less [`appinsights_listener.py`](https://github.com/SvenskaSpel/locust-plugins/blob/master/locust_plugins/appinsights_listener.py), from the good guys at [Svenska Spel](https://github.com/SvenskaSpel), but with typing.

They are useful when history of test runs is needed, or when wanting to correlate load tests with other events in the targeted environment.

### Load test users

`locust` comes with a simple user for loading an HTTP(S) endpoint and due to the nature of how the integration between `behave` and `locust` works in `grizzly`, it is not possible to directly use `locust.user.users` provided users, even for HTTP(S) targets.

* `RestApiUser`: send requests to REST API endpoinds, supports authentication with username+password or client secret
* `ServiceBusUser`: send to and receive from Azure Service Bus queues and topics
* `MessageQueueUser`: send and receive from IBM MQ queues
* `BlobStorageUser`: send and receive files to Azure Blob Storage
* `IotHubUser`: send/put files to Azure IoT Hub

### Request log

All failed requests are logged to a file which includes both header and body, both for request and response.

## Installation

```bash
pip3 install grizzly-loadtester
pip3 install grizzly-loadtester-cli
```

Do not forget to try the [example](https://biometria-se.github.io/grizzly/example/) which also serves as a boilerplate scenario project, or create a new grizzly project with:

```bash
grizzly-cli init my-grizzly-project
```

## Development

The easiest way to start contributing to this project is to have [Visual Studio Code](https://code.visualstudio.com/) (with "Remote - Containers" extension) and [docker](https://www.docker.com/) installed. The project comes with a `devcontainer`, which encapsulates everything needed for a development environment.

It is also possible to use a python virtual environment, but then you would have to manually download and install IBM MQ libraries, and install `grizzly` dependencies.

```bash
sudo mkdir /opt/mqm && cd /opt/mqm && wget https://ibm.biz/IBM-MQC-Redist-LinuxX64targz -O - | tar xzf -
export LD_LIBRARY_PATH="/opt/mqm/lib64:${LD_LIBRARY_PATH}"
cd ~/
git clone https://github.com/Biometria-se/grizzly.git
cd grizzly/
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .[dev,ci,mq,docs]
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "grizzly-loadtester",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "locust, behave, load, loadtest, performance, traffic generator",
    "author": null,
    "author_email": "biometria <opensource@biometria.se>",
    "download_url": "https://files.pythonhosted.org/packages/69/c5/2f8b41baf4f00c27a50e064880cb2ad035f1fc23555d3f5127d292ed99d9/grizzly-loadtester-2.10.1.tar.gz",
    "platform": null,
    "description": "# Grizzly - `/\u02c8\u0261\u0279\u026azli/`\n\n<img align=\"right\" src=\"https://raw.githubusercontent.com/Biometria-se/grizzly/main/docs/content/assets/logo/grizzly_grasshopper_brown_256px.png\" alt=\"grizzly logo\">\n<span>\n\n###### Framework\n\n![PyPI - License](https://img.shields.io/pypi/l/grizzly-loadtester?style=for-the-badge)\n![PyPI](https://img.shields.io/pypi/v/grizzly-loadtester?style=for-the-badge)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/grizzly-loadtester?style=for-the-badge)\n\n###### Command Line Interface\n\n![PyPI - License](https://img.shields.io/pypi/l/grizzly-loadtester-cli?style=for-the-badge)\n![PyPI](https://img.shields.io/pypi/v/grizzly-loadtester-cli?style=for-the-badge)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/grizzly-loadtester-cli?style=for-the-badge)\n\n###### Editor Support / Language Server\n![PyPI - License](https://img.shields.io/pypi/l/grizzly-loadtester-ls?style=for-the-badge)\n![PyPI](https://img.shields.io/pypi/v/grizzly-loadtester-ls?style=for-the-badge)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/grizzly-loadtester-ls?style=for-the-badge)\n\n###### Editor Support / Visual Studio Code Extension\n![GitHub License](https://img.shields.io/github/license/Biometria-se/grizzly-lsp?style=for-the-badge)\n![Visual Studio Marketplace Version (including pre-releases)](https://img.shields.io/visual-studio-marketplace/v/biometria-se.grizzly-loadtester-vscode?style=for-the-badge)\n![Visual Studio Marketplace Release Date](https://img.shields.io/visual-studio-marketplace/release-date/biometria-se.grizzly-loadtester-vscode?style=for-the-badge)\n</span>\n\n**Grizzly is a framework to be able to easily define load scenarios, and is primarily built on-top of two other frameworks.**\n\n> [Locust](https://locust.io): Define user behaviour with Python code, and swarm your system with millions of simultaneous users.\n\n> [Behave](https://behave.readthedocs.io/): Uses tests written in a natural language style, backed up by Python code.\n\n**`behave` is <del>ab</del>used for being able to define `locust` load test scenarios using [gherkin](https://cucumber.io/docs/gherkin). A feature can contain more than one scenario and all scenarios will run in parallell. This makes it possible to implement load test scenarios without knowing python or how to use `locust`.**\n\n[Locust](https://en.wikipedia.org/wiki/Locust) are a group of certain species of short-horned grasshoppers in the family Arcididae that have a swarming phase.\n\nThe name grizzly was chosen based on the grasshopper [Melanoplus punctulatus](https://en.wikipedia.org/wiki/Melanoplus_punctulatus), also known as __grizzly__ spur-throat grasshopper. This species [prefers living in trees](https://www.sciencedaily.com/releases/2005/07/050718234418.htm) over grass, which is a hint to [Biometria](https://www.biometria.se/)<sup>1</sup>, where `grizzly` originally was created.\n\n<sup>1</sup> _Biometria is a member owned and central actor within the swedish forestry that performs unbiased measurement of lumber flowing between forest and industry so that all of Swedens forest owners can feel confident selling their lumber._\n\n## Documentation\n\nMore detailed documentation can be found [here](https://biometria-se.github.io/grizzly) and the easiest way to get started is to check out the [example](https://biometria-se.github.io/grizzly/example/).\n\n\n## Features\n\nA number of features that we thought `locust` was missing out-of-the-box has been implemented in `grizzly`.\n\n### Test data\n\nSupport for synchronous handling of test data (variables). This is extra important when running `locust` distributed and there is a need for each worker and user to have unique test data, that cannot be re-used.\n\nThe solution is heavily inspired by [Karol Brejnas locust experiments - feeding the locust](https://medium.com/locust-io-experiments/locust-experiments-feeding-the-locusts-cf09e0f65897). A producer is running on the master (or local) node and keeps track of what has been sent to the consumer running on a worker (or local) node. The two communicates over a dedicated [ZeroMQ](https://zeromq.org) connection.\n\nWhen the consumer wants new test data, it sends a message to the server that it is available and for which scenario it is going to run. The producer then responds with unique test data that can be used.\n\n### Statistics\n\nListeners for both InfluxDB and Azure Application Insights are included. The later is more or less [`appinsights_listener.py`](https://github.com/SvenskaSpel/locust-plugins/blob/master/locust_plugins/appinsights_listener.py), from the good guys at [Svenska Spel](https://github.com/SvenskaSpel), but with typing.\n\nThey are useful when history of test runs is needed, or when wanting to correlate load tests with other events in the targeted environment.\n\n### Load test users\n\n`locust` comes with a simple user for loading an HTTP(S) endpoint and due to the nature of how the integration between `behave` and `locust` works in `grizzly`, it is not possible to directly use `locust.user.users` provided users, even for HTTP(S) targets.\n\n* `RestApiUser`: send requests to REST API endpoinds, supports authentication with username+password or client secret\n* `ServiceBusUser`: send to and receive from Azure Service Bus queues and topics\n* `MessageQueueUser`: send and receive from IBM MQ queues\n* `BlobStorageUser`: send and receive files to Azure Blob Storage\n* `IotHubUser`: send/put files to Azure IoT Hub\n\n### Request log\n\nAll failed requests are logged to a file which includes both header and body, both for request and response.\n\n## Installation\n\n```bash\npip3 install grizzly-loadtester\npip3 install grizzly-loadtester-cli\n```\n\nDo not forget to try the [example](https://biometria-se.github.io/grizzly/example/) which also serves as a boilerplate scenario project, or create a new grizzly project with:\n\n```bash\ngrizzly-cli init my-grizzly-project\n```\n\n## Development\n\nThe easiest way to start contributing to this project is to have [Visual Studio Code](https://code.visualstudio.com/) (with \"Remote - Containers\" extension) and [docker](https://www.docker.com/) installed. The project comes with a `devcontainer`, which encapsulates everything needed for a development environment.\n\nIt is also possible to use a python virtual environment, but then you would have to manually download and install IBM MQ libraries, and install `grizzly` dependencies.\n\n```bash\nsudo mkdir /opt/mqm && cd /opt/mqm && wget https://ibm.biz/IBM-MQC-Redist-LinuxX64targz -O - | tar xzf -\nexport LD_LIBRARY_PATH=\"/opt/mqm/lib64:${LD_LIBRARY_PATH}\"\ncd ~/\ngit clone https://github.com/Biometria-se/grizzly.git\ncd grizzly/\npython -m venv .venv\nsource .venv/bin/activate\npython -m pip install -e .[dev,ci,mq,docs]\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Traffic generator based on locust and behave",
    "version": "2.10.1",
    "project_urls": {
        "Code": "https://github.com/biometria-se/grizzly/",
        "Documentation": "https://biometria-se.github.io/grizzly/",
        "Tracker": "https://github.com/Biometria-se/grizzly/issues"
    },
    "split_keywords": [
        "locust",
        " behave",
        " load",
        " loadtest",
        " performance",
        " traffic generator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9ceaa67d5e9c82c3f2ffa1a35174a0c7eff5ece24adca6aef62c9df962aa9635",
                "md5": "446f7cdf43b96d0c2bd796f33baa982c",
                "sha256": "a4923ed32f59b7bc8e0331e95b730dbe1eb40b8c5b4621a5314d8dee57f38362"
            },
            "downloads": -1,
            "filename": "grizzly_loadtester-2.10.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "446f7cdf43b96d0c2bd796f33baa982c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 228564,
            "upload_time": "2024-04-26T11:08:48",
            "upload_time_iso_8601": "2024-04-26T11:08:48.738129Z",
            "url": "https://files.pythonhosted.org/packages/9c/ea/a67d5e9c82c3f2ffa1a35174a0c7eff5ece24adca6aef62c9df962aa9635/grizzly_loadtester-2.10.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "69c52f8b41baf4f00c27a50e064880cb2ad035f1fc23555d3f5127d292ed99d9",
                "md5": "d277e22f3544275fe8c5eaefe0f23a12",
                "sha256": "faa34e8e1d297595bd430b3f01263cf30241b8bd5b196c4172d4e6afa84ee201"
            },
            "downloads": -1,
            "filename": "grizzly-loadtester-2.10.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d277e22f3544275fe8c5eaefe0f23a12",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 663309,
            "upload_time": "2024-04-26T11:08:50",
            "upload_time_iso_8601": "2024-04-26T11:08:50.617947Z",
            "url": "https://files.pythonhosted.org/packages/69/c5/2f8b41baf4f00c27a50e064880cb2ad035f1fc23555d3f5127d292ed99d9/grizzly-loadtester-2.10.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-26 11:08:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "biometria-se",
    "github_project": "grizzly",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "grizzly-loadtester"
}
        
Elapsed time: 0.38609s