Charge

fr en

Table of contents

  1. Summary

  2. Documentation

  3. Installation

  4. Configuration

  5. Utilisation

  6. Contact


  1. Summary
  2. Charge is a load testing software. It allows to test what can accept an LDAP directory. An XML configuration file allows to define operations to run, the ordre of these operations and eventually to generate LDAP operations from simples rules.

    In particular, it is possible to define:

    Originally LDAP-oriented, Charge will be able to be easily enhanced in order to manage other protocols and servers types.


  3. Documentation
  4. Many informations can be found here in the file, and in some other files:

    These informations and other informations can be found on the web site: http://loadtesting.sourceforge.net


  5. Installation
  6. See INSTALL file.


  7. Configuration
  8. Charge's configuration file is an XML file. It use the DTD charge.dtd. It should begin with:

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE charge SYSTEM "charge.dtd">
    <charge>

    and end with:

    </charge>

    When you make a load test, you would have to define a server, an operation sequence and some paramaters for these operations.

    1. Declaring a server
    2. The <server> tag allows to declare a new server. Its arguments are:

      • name: the server ID. If this name is "default", this server will be considered as default one.
      • host: server IP or hostname.
      • port: server TCP/IP port.
      • ldapversion: version of LDAP protocol to use (2 by default)
      • protocol: protocol used (ldap by defaut, may be ldaps or ldap+tls)

      Example:

      <server name="default" host="myldap.mydomain" port="389"/>

    3. Declaring parameters
    4. Parameters are created by lists of sets of parameters. Actually, each operation can take many parameters (for example an LDAP bind takes the user ID and its password). This is what we call a set of parameters. The lists of sets of parameters allows to define many sets of parameters. One set will be randomly choosen when the software run.

      The <list> tag allows de declare a list of sets of parameters. It takes as argument:

      • name: the list ID.

      Inside <list> tag, you can declare a set of parameters with the <items> tag.

      Inside <items> tag, you can declare each parameter with an <item> tag. <item> takes one argument:

      • value: parameter's value.

      Example:

      <list name="connection">
        <items>
          <item value="uid=user,o=example,c=country"/>
          <item value="secret"/>
        </items>
      </list>

      You can also generate many sets of parameters with the arguments of the <items> tag:

      • var: char to replace
      • from: beginning value (default is 1)
      • to: end value (default is 1)
      • step: increment (default is 1)

      Example:

      <list name="connections">
        <items var="@" from="1" to="3">
          <item value="uid=user@,o=example,c=country"/>
          <item value="secret"/>
        </items>
      </list>

      is the same as:

      <list name="connections">
        <items>
          <item value="uid=user1,o=example,c=country"/>
          <item value="secret"/>
        </items>
        <items>
          <item value="uid=user2,o=example,c=country"/>
          <item value="secret"/>
        </items>
        <items>
          <item value="uid=user3,o=example,c=country"/>
          <item value="secret"/>
        </items>
      </list> 

      Inside <list> tag, you can use <reflist> tag too, which allows to include a list. It takes some arguments:

      • name: the list ID.
      • var: char to replace
      • from: beginning value (default is 1)
      • to: end value (default is 1)
      • step: increment (default is 1)

      As with the <items> tag, so you can generate a list from an other list accordingto a variable.

      Example:

      See charge.conf.complicated for examples of using <reflist> (lists concatenation, multi-variables generations,...).


    5. Declaring operations sequences
    6. Operations sequences are defined by the <seq> tag. Its arguments are:

      • nb: number of simultaneous sequences to create (default is 1). For each sequence, one thread is created.
      • it: number of times a sequence is executed (default is 1).
      • server: server which will be connected (default is the "default" server as defined in 4.1).

      If many <seq> tags are defined, they will be executed at the same time (in different threads).

      Inside each <seq> tag, you can declare <op> tags which are the operations to run. <op> tags have got some arguments:

      • type: operation to execute (see 4.4)
      • nb: number of executions of this operation (default is 1); if the value is "all", all the sets of parameters will be taken
      • name: the ID of a list of sets of parameters already defined (optionnal, see 4.2)

      Inside <seq> tag, you can use <items> and/or <reflist> tags too, as defined in 4.2.

      Example:

      <seq nb="10" it="100" server="myserver">
        <op type="bind" nb="1" name="connection"/>
        <op type="unbind"/>
      </seq>

      This sequence will create 10 threads, each one executing 100 bind/unbind operations.


    7. Implemented operations
    8. Following operations are implemented today.

      • bind (2 arguments): LDAP authentication
        • user ID (dn)
        • user password

      • search (4 arguments): LDAP search
        • base (ex: "o=example,c=country")
        • scope (scope: "base", "one" or "sub")
        • filter ("" is "*")
        • list of coma-separated attributes ("" or "*" for every attributes)

      • modify (3 arguments): LDAP modify
        • dn of the entry to modify
        • attribute to modify
        • new value ("" to delete the attribute)

      • add (2 arguments): add an LDAP entry
        • branch where the entry will be added
        • ID of the person to add

        The LDAP entry will be of this type:

        dn: uid=<ID>,<branch>
        objectClass: top
        objectClass: person
        objectClass: organizationalPerson
        objectClass: inetOrgPerson
        objectClass: extensibleObject
        sn: <ID>
        cn: <ID>
        uid: <ID>
        userPassword: <ID>

      • delete (1 argument): LDAP delete
        • dn of the entry to delete

      • unbind (no argument): LDAP unbind
      • delay (1 argument): pause
        • time in nanoseconds of the pause


  9. Utilisation
  10. The charge executable takes only one optionnal argument: the name of the XML configuration file. If it is not indicated, the default argument is "charge.conf".


  11. Contact
  12. You can contact me at the following adress in french (preferably) or in english: raphael . ouazana at linagora . com

Linagora SourceForge.net Logo