JUnit Test Suite for AMQP 1.0 Implementations

Introduction

This JUnit based test suite uses the SwiftMQ AMQP 1.0 client and can be used to test AMQP 1.0 broker implementations.

Configuration

The test suite has many configuration options. All of them are specified as Java system properties (-Dname=value on the command line):

System Property Default Description
socketfactory com.swiftmq.net.PlainSocketFactory SwiftMQ socket factory. To use SSL/TLS, specify com.swiftmq.net.JSSESocketFactory
hostname localhost The hostname.
port 5672 The port.
usesasl false Use SASL or start directly with AMQP.
anonlogin false If SASL, use anonymous login.
username Username
password Password
mechanism PLAIN SASL authentication mechanism to use, e.g. CRAM-MD5.
idletimeout 60000 Timeout after which an idle connection is closed. idletimeout/2 is the interval in which the SwiftMQ client sends heartbeats.
maxframesize unlimited Maximium frame size in bytes. Set it to a small value to test multiple transfers per message.
session.window.incoming 100 Incoming session window.
session.window.outgoing 100 Outgoing session window.
prefix-queuename amqp_testqueue Prefix for queue names used in tests. An index 1..npairs is appended to the name.
prefix-topicname amqp_testtopic Prefix for topic names used in tests. An index 1..npairs is appended to the name.
nmsgs 100000 Number of messages sent for each pair.
linkcredit 500 Link credit for receiving nodes.
messagefactory func.v100.base.AMQPValueStringMessageFactory Message factory to create messages.
persistent true Message durability
npairs 10 Number of pairs to use in tests. One pair is producer/queue/consumer resp, producer/topic/subscribers.
nsubscribers 10 Number subscriber per topic.
txrcvsize 10 Size of receive transactions.
txsendsize 10 Size of send transactions.
swiftmq.amqp.open.hostname DNS name of the target host May be used to set the hostname field of the open frame to a different value than the DNS name (since 1.0.1).

Available message factories:

Factory Description
func.v100.base.AMQPValueStringMessageFactory Creates messages with an amqp-value containing a string.
func.v100.base.AMQPValueByteMessageFactory Creates messages with an amqp-value containing a byte.
func.v100.base.AMQPValueMapMessageFactory Creates messages with an amqp-value containing a map with strings and longs.
func.v100.base.AMQPSequenceMessageFactory Creates messages with an amqp-sequence containing a list of strings and longs.
func.v100.base.DataMessageFactory Creates messages with 3 data sections of each 1024 bytes. Use this factory in conjunction with a maxframesize of 512 to test multiple transfers per message.

Download

Download: testsuite_1_1_3.zip (a proprietary license is included to make your legals happy)

Debug Options

There are 2 system properties which can be used to get debug information. The output goes to System.out.

System Property Default Description
swiftmq.amqp.frame.debug false AMQP frame debug output.
swiftmq.amqp.debug false SwiftMQ AMQP 1.0 client debug output.

Run the Suite

You need JDK 1.5 or higher installed on your machine. After unzip switch to the "scripts" directory.

To run the suite with a Swing-GUI call:

        ./guirunner

To run the suite with a text-based console call:

        ./consolerunner <testcase>

The following list contains the available test cases. Specify it in the "Test Class Name" box of the JUnit frame or as a parameter to the consolerunner. If you want to run the whole suite, specify "func.v100.Suite". You can also run each test separately.

  • func.v100.Suite
  • func.v100.ps.Suite
  • func.v100.ps.one_to_n.Suite
  • func.v100.ps.one_to_n.durable.Suite
  • func.v100.ps.one_to_n.durable.dedicatedsession.Suite
  • func.v100.ps.one_to_n.durable.dedicatedsession.at_least_once.Suite
  • func.v100.ps.one_to_n.durable.dedicatedsession.at_most_once.Suite
  • func.v100.ps.one_to_n.durable.dedicatedsession.exactly_once.Suite
  • func.v100.ps.one_to_n.non_durable.Suite
  • func.v100.ps.one_to_n.non_durable.dedicatedsession.Suite
  • func.v100.ps.one_to_n.non_durable.dedicatedsession.at_least_once.Suite
  • func.v100.ps.one_to_n.non_durable.dedicatedsession.at_most_once.Suite
  • func.v100.ps.one_to_n.non_durable.dedicatedsession.exactly_once.Suite
  • func.v100.ptp.Suite
  • func.v100.ptp.dedicatedsession.Suite
  • func.v100.ptp.dedicatedsession.at_least_once.Suite
  • func.v100.ptp.dedicatedsession.at_most_once.Suite
  • func.v100.ptp.dedicatedsession.exactly_once.Suite
  • func.v100.ptp.requestreply.Suite
  • func.v100.ptp.requestreply.at_least_once.Suite
  • func.v100.ptp.requestreply.at_most_once.Suite
  • func.v100.ptp.requestreply.exactly_once.Suite
  • func.v100.ptp.singlesession.Suite
  • func.v100.ptp.singlesession.at_least_once.Suite
  • func.v100.ptp.singlesession.at_most_once.Suite
  • func.v100.ptp.singlesession.exactly_once.Suite
  • func.v100.ptp.transacted.Suite
  • func.v100.ptp.transacted.acquisition.Suite
  • func.v100.ptp.transacted.acquisition.commit.Suite
  • func.v100.ptp.transacted.acquisition.commit.at_least_once.Suite
  • func.v100.ptp.transacted.acquisition.commit.exactly_once.Suite
  • func.v100.ptp.transacted.acquisition.commit.requestreply.Suite
  • func.v100.ptp.transacted.acquisition.commit.requestreply.at_least_once.Suite
  • func.v100.ptp.transacted.acquisition.commit.requestreply.exactly_once.Suite
  • func.v100.ptp.transacted.acquisition.rollback.Suite
  • func.v100.ptp.transacted.acquisition.rollback.at_least_once.Suite
  • func.v100.ptp.transacted.acquisition.rollback.at_most_once.Suite
  • func.v100.ptp.transacted.acquisition.rollback.exactly_once.Suite
  • func.v100.ptp.transacted.acquisition.rollback.requestreply.Suite
  • func.v100.ptp.transacted.acquisition.rollback.requestreply.at_least_once.Suite
  • func.v100.ptp.transacted.acquisition.rollback.requestreply.exactly_once.Suite
  • func.v100.ptp.transacted.retirement.Suite
  • func.v100.ptp.transacted.retirement.commit.Suite
  • func.v100.ptp.transacted.retirement.commit.at_least_once.Suite
  • func.v100.ptp.transacted.retirement.commit.exactly_once.Suite
  • func.v100.ptp.transacted.retirement.commit.requestreply.Suite
  • func.v100.ptp.transacted.retirement.commit.requestreply.at_least_once.Suite
  • func.v100.ptp.transacted.retirement.commit.requestreply.exactly_once.Suite
  • func.v100.ptp.transacted.retirement.rollback.Suite
  • func.v100.ptp.transacted.retirement.rollback.at_least_once.Suite
  • func.v100.ptp.transacted.retirement.rollback.exactly_once.Suite
  • func.v100.ptp.transacted.retirement.rollback.requestreply.Suite
  • func.v100.ptp.transacted.retirement.rollback.requestreply.at_least_once.Suite
  • func.v100.ptp.transacted.retirement.rollback.requestreply.exactly_once.Suite

The following list contains test concerning link recovery (not part of the above test suites).

  • func.v100.ptp.recover.Suite
  • func.v100.ptp.recover.receive.Suite
  • func.v100.ptp.recover.receive.at_least_once.Suite
  • func.v100.ptp.recover.receive.at_most_once.Suite
  • func.v100.ptp.recover.receive.exactly_once.Suite
  • func.v100.ptp.recover.send.Suite
  • func.v100.ptp.recover.send.at_least_once.Suite
  • func.v100.ptp.recover.send.at_most_once.Suite
  • func.v100.ptp.recover.send.exactly_once.Suite