Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The DataSet component provides a mechanism to easily perform load & soak testing of your system. It works by allowing you to create DataSet instances both as a source of messages and as a way to assert that the data set is received.

URI format

Code Block

dataset:name

Where name is used to find the DataSet instance in the Registry

Example

For example to test that 10 million messages are sent to a queue then consumed from a queue without loosing any messages.

...

Code Block
test:expectedMessagesEndpointUri

Where expectedMessagesEndpointUri refers to some other Component URI where the expected message bodies are pulled from before starting the test.

Example

For example you could write a test case as follows

Code Block
// send the dataset to a queue
from("sedadataset:someEndpointfoo").to("activemq:SomeQueue");

// now lets test that the messages are consumed correctly
from("activemq:SomeQueue").to("test:file://data/expectedOutput?noop=truedataset:foo");

If your test then invokes the MockEndpoint.assertIsSatisfied(camelContext) method then your test case will perform the necessary assertions.

Here is a real example test case using Mock and Spring along with its Spring XML.

To see how you can set other expectations on the test endpoint, see the Mock componentThe above would look in the Registry to find the foo DataSet instance which is used to create the messages.

Include Page
CAMEL:Endpoint See Also
CAMEL:Endpoint See Also

...