Skip to main content

Tools and functions to make testing Appian with Locust easier

Project description

Appian Locust is a wrapper library around Locust for load testing Appian. This library is intended to be used as an alternative to tools such as Jmeter and Load Runner.

Appian Locust capabilities

  • Logging in and logging out

  • Form interactions (filling/submitting)

  • Finding and interacting with basic components on a SAIL interface

  • Navigating to records/reports/sites

For full documentation, visit the docs page

Disclaimer: This library is continuously evolving. Currently the main focus is supporting essential use-cases. We are happy to accept contributions to further extend functionality, address bug fixes and improve usability. Please see the Contributing section and feel free to reach out.

Quick Start Guide

This is a quick guide to getting up and running with the appian-locust library. You will need Python 3.7+ installed on your machine before proceeding.

Setup

  1. Install appian-locust using pip, for more comprehensive projects we recommend using pipenv.

pip install appian-locust

If using pipenv, simply start from the following Pipfile:

[packages]
appian-locust = {version = "*"}

[requires]
python_version = "3.10"

[pipenv]
allow_prereleases = true

2. Configure your test to point at the Appian instance you will be using. You can use example file provided in this repository example_config.json:

  • Set host_address to the address of your Appian instance.

  • In auth, specify the username and password of the user account to use.

{
    "host_address": "site-name.appiancloud.com",
    "auth": [
        "user.name",
        "password"
    ]
}
  1. Run the sample test example_locustfile.py.

locust -f example_locustfile.py -u 1 -t 60 --headless

If everything is set up correctly, you should start to see output from the load test reporting results. This should run for 60 seconds and end with a summary report of the results.

  • For more examples of different site interactions, see the example_*.py files included in this repository.

  • For more in-depth information about the test library, see the rest of this documentation.

Build from source

Clone the repository:

git clone -o prod git@gitlab.com:appian-oss/appian-locust.git

Install the library globally:

pip install -e appian-locust

If you’re using a virtualenv or a dependency management tool (e.g. pipenv), you can do the same type of install, but you will want to be in the context of the virtualenv (i.e. source the virtualenv), and you’ll need to pass the path to the repository you cloned.

Note: It’s highly recommended that you use a virtual environment when installing python artifacts. You can follow the instructions here to install virtualenv and pip.

If you have issues installing, make sure you have the proper prerequisites installed for Locust and its dependencies. If you’re having trouble on Windows, check here

Troubleshooting

  • “Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known”

  • “Login unsuccessful, no multipart cookie found…make sure credentials are correct”

    • check that auth specifies a valid username and password combination for the site you’re testing on in example_config.json.

  • “General request and response debugging”

    • Add self.appian.interactor.record_mode = True to your AppianTaskSet subclass. Files will be placed in /record_responses where the runner is executed.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

appian-locust-2.0.0a3.tar.gz (105.3 kB view details)

Uploaded Source

Built Distribution

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

appian_locust-2.0.0a3-py3-none-any.whl (92.3 kB view details)

Uploaded Python 3

File details

Details for the file appian-locust-2.0.0a3.tar.gz.

File metadata

  • Download URL: appian-locust-2.0.0a3.tar.gz
  • Upload date:
  • Size: 105.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for appian-locust-2.0.0a3.tar.gz
Algorithm Hash digest
SHA256 bc1526aa4cf8de83dea098f426b192e11f66bf40b452bb6217037dcc8dd9f0a3
MD5 2900430426f811af8c86d6a77914ecd7
BLAKE2b-256 10cb1a76cb7751f36a3e07ca248f155967b70ed61e0c352b0b01c7271be1aefa

See more details on using hashes here.

File details

Details for the file appian_locust-2.0.0a3-py3-none-any.whl.

File metadata

File hashes

Hashes for appian_locust-2.0.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 6742a74309436c04bbb11a742c90b8fd6080b067154e576b92e5f2f047bd5dc6
MD5 3abe1eb88fbfceebd53986a1359192ba
BLAKE2b-256 1f7ed45693ac4746b4605a26d4be329a5033b7956e81f72678b6831d6238f8df

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