Citrus 2.7.2 is a bugfix release with lots of improvements. See the following list of major changes included in the box.

Database transaction handling

When Citrus accesses data storage in form of SQL statements executed on some datasource the transaction handling has not been set in the past. Each SQL statement has been committed immediately. Especially when executing multiple SQL statement via script this could lead to inconsistencies. With the new release you can make use of Spring’s transaction handling when executing SQL statements with Citrus. You can set a transaction handler with isolation levels and default transaction timeout settings. This enables you to use transaction blocks for multiple statements with one single commit or rollback. Read more about this in chapter actions accessing the database.

Environment settings

We added a mechanism to overwrite general settings in Citrus via system properties and environment variables. This makes Citrus ready for runtime environments such as Docker and Kubernetes where you can use environment variables to change Citrus behavior. The available settings and variable names can be seen in chapter configuration.

Setting Http cookie related Http headers has been possible in previous versions. We improved that cookie handling in Http request and response messages with a dedicated DSL for adding and verifying cookie information in Http headers. The Citrus http-server is able to advice the client to set a new cookie with respective Set-Cookie headers in response messages. The http-client is able to verify the cookie attributes such as name, value, max-age and so on. In addition to that the client is able to send the cookie name value pair in further requests as a reference via “Cookie” message headers. The complete new cookie handling is described in section Http cookie handling.

File resource encoding

The Citrus test case is able to load file resources in various situations e.g. when defining expected message contents. The file resource encoding and charset used a system-wide default setting which has been settable via system property (citrus.file.encoding). In addition to that we have added the opportunity to overwrite this system-wide setting in each resource read operation. This means that everywhere where it is possible to load a file resource you can explicitly set a file encoding and charset for this read operation. This enables you to use more than one system-wide file encoding setting when reading data from external file resources in Citrus.

Bugfixes

Some bugs and issues have been resolved. For a detailed overview of all changes please see list of closed issuess on github.