We have added lots of new features and improvements with Citrus ## Namely these are the new modules for RMI and JMX support, a new x-www-form-urlencoded message validator and new functions anc test actions. Just have a look at the following features that made it to the box.
Hamcrest matcher support
Hamcrest is a very powerful matcher library that provides a fantastic set of matcher implementations for message validation purpose. Citrus now supports these matchers coming from Hamcrest library. On the one hand you can use Hamcrest matchers as a Citrus validation matcher as described in Section 3## “assertThat()”. On the other hand you can use Hamcrest matchers now directly using the Citrus Java DSL. See details for this feature in Section 1## “Validate with JSONPath”.
Binary base64 message validator
There is a new message validator implementation that automatically converts binary message content to a base64 encoded String representation for comparison. This is the easiest way to compare binary message content with an expected message payload. See Section ## “Binary message validation” how this is working for you.
Remote method invocation is a standard Java technology and API for calling methods on remote objects across different JVM instances. Although RMI has lost its popularity it is still used in legacy components. Testing RMI bean invocation is a hard thing to do. Now Citrus provides client and server support for remote interface invocation. See Chapter 29, RMI support for details.
Similar to RMI JMX can be used to connect to remote bean invocation. This time we expose some beans to a managed bean server in order to be managed by JMX operations for read and write. With Citrus 2.5 we have added a client and server support for calling and providing managed beans on a mbean server. See Chapter 30, JMX support for details.
With 2.5 we have added mechanisms for injecting Citrus components to your Java DSL test methods. This is very useful when needing access to the Citrus test context for instance. Also we are able to use new injection of test designer and runner instances in order to support parallel test execution with multiple threads. See the explanations in Section 4.## “Designer/Runner injection” and Section 4.## “Test context injection”.
Http x-www-form-urlencoded message validator
HTML form data can be transmitted with different methods and content types. One of the most common ways is to use x-www-form-urlencoded form data content. As validation can be tricky we have added a special message validator for that. See Section 1## “HTTP form urlencoded data” for details.
Date range validation matcher
Added a new validation matcher implementation that is able to check that a date value is between a certain date range (from and to) The date range is able to focus on days as well as additional time (hour, minute, second) specifications. See Section 3## “dateRange()” for details.
Read file resource function
A new function implementation offers you the possibilities to read file resource contents as inline data. The function is called and returns the file content as return value. The file content is then placed right where the function was called e.g. inside of a message paylaod element or as message header value. See Section 3## “citrus:readFile()” for details.
The new timer test action container repeats its execution based on a time expression (e.g. every 5 seconds). With this timer we can repeat test actions with a fixed time delay or constantly execute test actions with time schedule. See Section 1## “Timer” and Section 1## “Stop Timer” for details.
Upgrade to Vert.x 3.2.0
The Vert.x module was upgraded to use Vert.x 3.2.0 version. The Citrus module implementation was updated to work with this new Vert.x version. Learn more about the Vert.x integration in Citrus with Chapter 24, Vert.x event bus support.