Differences between revisions 13 and 14
Revision 13 as of 2011-07-01 05:41:30
Size: 3554
Editor: TimoSirainen
Comment:
Revision 14 as of 2015-09-03 22:35:36
Size: 3608
Comment: Added documentation on users and domains
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
 * user=$USER: Username template. You can use multiple random users and domains by giving %d in the template. So for example {{{user%d}}} returns user1..user100 and {{{user%d@domain%d.org}}} returns user1..100@domain1..100.org. The 1..100 range is hardcoded to the binary. You can change them from {{{USER_RAND}}} and {{{DOMAIN_RAND}}} defines.  * user=$USER: Username template. You can use multiple random users and domains by giving %d in the template. So for example {{{user%d}}} returns user1..user100 and {{{user%d@domain%d.org}}} returns user1..100@domain1..100.org. The upper limit for users can be set with the "users=#" parameter (default 100), and the upper limit for domains can be set with the "domains=#" parameter (default 100).

Running ImapTest

The most important parameters (and their defaults) are:

  • host=127.0.0.1: Host name/IP address where to connect.
  • port=143: Port what to use.
  • user=$USER: Username template. You can use multiple random users and domains by giving %d in the template. So for example user%d returns user1..user100 and user%d@domain%d.org returns user1..100@domain1..100.org. The upper limit for users can be set with the "users=#" parameter (default 100), and the upper limit for domains can be set with the "domains=#" parameter (default 100).

  • userfile=FILE: Read usernames from given file, one user per line. It's also possible to give passwords for users in username:password format.
  • pass=pass: Password to use for all users. There's currently no way to use different passwords for different users.
  • mbox=~/mail/dovecot-crlf: Path to mbox file where to append messages from. See below for how this is used.

Other useful parameters include:

  • clients=10: Number of simultaneous client connections to use.
  • secs=n: Run imaptest n seconds and then exit. Setting this to less than the time to run all scripts with tests=dir will lead to spurious test failures.
  • msgs=30: Try to keep the mailbox size around this many messages.
  • box=INBOX: Mailbox to use for testing. INBOX is the default.
  • copybox=n: When testing COPY command, this specifies the destination mailbox.
  • seed=n: Seed to use for random generator. Setting this to some specific value makes repeated benchmarks a bit more reliable, because the used commands should be the same then.
  • disconnect_quit: If a client gets disconnected, quit. Use logout=0 parameter with this one. This is useful when debugging some problem in the server.
  • no_pipelining: Don't send multiple commands at once to server.
  • rawlog: Write rawlog.* files for all connections containing their input and output.
  • master=USER: Use master user logins.

Selecting what to test:

  • <state>=<probability>[,<probability2>]: State probabilities to use.

  • checkpoint=n: Run a checkpoint every n seconds. See below.
  • own_msgs: Assigns an owner client for each message. Complain if flags for a message is changed by a non-owner session.
  • own_flags: Assigns an owner client for each flag and keyword. Complain if they're changed by another session.
  • random: Switch randomly between states.
  • no_tracking: Don't track and complain about IMAP state. Makes it use a bit less CPU.
  • test=dir: Run scripted tests from given directory instead of doing stress testing.

TLS/SSL

ImapTest doesn't currently support TLS/SSL directly, but you can use stunnel for creating a tunnel for imaps:

stunnel -c -d 14300 -f -r imap.domain.org:993

Then use imaptest host=127.0.0.1 port=14300.

Append mbox

When saving messages, imaptest needs to get the messages from somewhere. mbox=path parameter specifies path to a file in mbox format that's used. Messages are sequentially appended from there. Once imaptest reaches the last message, it wraps back to appending the first message.

Currently imaptest's state tracking expects that Message-IDs are unique within the mbox, otherwise it gives bogus errors. If you really want to avoid changing the Message-IDs, use no_tracking setting to disable state tracking.

You can get a test mbox file from for example http://www.dovecot.org/tmp/dovecot-crlf. It's a 10MB file containing messages from Dovecot mailing list with unique Message-ID headers.

None: ImapTest/Running (last edited 2023-11-07 21:13:14 by TimoSirainen)