Load test your LDAP server with Artillery.io
Based on
Kinesis Engine by Artillery
AWS Lambda Engine by orchestrated
LDAP Operations supported:
- bind
- search
- unbind
Important: The plugin requires Artillery 1.5.8-3
or higher.
npm i artillery-engine-ldap
- set
config.target
to the LDAP Server hostname - Specify additional options in
config.ldap
:-
timeout
- Timeout(in ms) by Operation type
-
Specifics on Artillery script configuration can be found on the Script Reference
-
dn
- DN of the Bind ser -
password
- password for the Binds user
-
base
- DN of the node to used as starting point for the search -
filter
- LDAP filter to be matched against the search results (default: objectClass=*) -
scope
- Scope of the search (default: sub) -
attributes
- List of attributes to be returned by the search
- Unbind doesn't take any options
# Main Configuration section
config:
target: "{{ $processEnvironment.TARGET }}" # LDAP Server Host to be tested
# LDAP Engine Specific configuration
ldap:
unbind:
timeout: 30000
search:
timeout: 30000
# Load Test Phase configuration
phases:
- duration: 60 # Seconds
arrivalRate: 5 # New connections/scenarios per second
# Engine definition
engines:
ldap: {}
scenarios: # 2 Scenarios defined
- name: "Users - single"
engine: "ldap"
flow:
- bind:
dn: "cn=admin,ou=users,dc=myDomain,dc=com"
password: "{{ $processEnvironment.BIND_PASSWORD }}"
- search:
base: "ou=users,dc=myDomain,dc=com"
- unbind: {}
- name: "Users - average"
engine: "ldap"
flow:
- bind:
dn: "cn=admin,ou=users,dc=myDomain,dc=com"
password: "{{ $processEnvironment.BIND_PASSWORD }}"
- loop: # Loop operations sample
flow:
- search:
base: "ou=users,dc=myDomain,dc=com"
count: 2
- unbind: true
TARGET=ldaps://ldap.myDomain.com BIND_PASSWORD=password artillery run my_script.yml
To enable debug messages on the output just prepend DEBUG=*
to the artillery command.
DEBUG=* npx artillery run my_script.yml
DEBUG=engine:ldap npx artillery run my_script.yml