Package: grizzly-loadtester
Grizzly -/ˈɡɹɪzli/FrameworkCommand Line InterfaceEditor Support / Language ServerEditor Support / Visual Studio Code ExtensionGrizzly is a framework to be able to easily define load scenarios, and is primarily built on-top of two other frameworks.Locust: Define user behaviour with Python code, and swarm your system with millions of simultaneous users.Behave: Uses tests written in a natural language style, backed up by Python code.behaveisabused for being able to definelocustload test scenarios usinggherkin. 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 uselocust.Locustare 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 grasshopperMelanoplus punctulatus, also known asgrizzlyspur-throat grasshopper. This speciesprefers living in treesover grass, which is a hint toBiometria1, wheregrizzlyoriginally was created.1Biometria 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.DocumentationMore detailed documentation can be foundhereand the easiest way to get started is to check out theexample.FeaturesA number of features that we thoughtlocustwas missing out-of-the-box has been implemented ingrizzly.Test dataSupport for synchronous handling of test data (variables). This is extra important when runninglocustdistributed 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 byKarol Brejnas locust experiments - feeding the locust. 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 dedicatedZeroMQconnection.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.StatisticsListeners for both InfluxDB and Azure Application Insights are included. The later is more or lessappinsights_listener.py, from the good guys atSvenska Spel, 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 userslocustcomes with a simple user for loading an HTTP(S) endpoint and due to the nature of how the integration betweenbehaveandlocustworks ingrizzly, it is not possible to directly uselocust.user.usersprovided users, even for HTTP(S) targets.RestApiUser: send requests to REST API endpoinds, supports authentication with username+password or client secretServiceBusUser: send to and receive from Azure Service Bus queues and topicsMessageQueueUser: send and receive from IBM MQ queuesBlobStorageUser: send and receive files to Azure Blob StorageIotHubUser: send/put files to Azure IoT HubRequest logAll failed requests are logged to a file which includes both header and body, both for request and response.Installationpip3installgrizzly-loadtester
pip3installgrizzly-loadtester-cliDo not forget to try theexamplewhich also serves as a boilerplate scenario project, or create a new grizzly project with:grizzly-cliinitmy-grizzly-projectDevelopmentThe easiest way to start contributing to this project is to haveVisual Studio Code(with "Remote - Containers" extension) anddockerinstalled. The project comes with adevcontainer, 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 installgrizzlydependencies.sudomkdir/opt/mqm&&cd/opt/mqm&&wgethttps://ibm.biz/IBM-MQC-Redist-LinuxX64targz-O-|tarxzf-exportLD_LIBRARY_PATH="/opt/mqm/lib64:${LD_LIBRARY_PATH}"cd~/
gitclonehttps://github.com/Biometria-se/grizzly.gitcdgrizzly/
python-mvenv.venvsource.venv/bin/activate
python-mpipinstall-e.[dev,ci,mq,docs]