DataSet Component
Include Page | ||||
---|---|---|---|---|
|
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.
For example to test that 10 million messages are sent to a queue then consumed from a queue without loosing any messages.
URI format
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 |
---|
from("seda:someEndpoint").
to("test:file://data/expectedOutput?noop=true");
|
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 component.
Include Page | ||||
---|---|---|---|---|
|
...