The Citrus community is happy to announce the release of Citrus 5.2.1! This patch release delivers a broad set of new features alongside important stability and correctness fixes.

The release contains 18 new features and enhancements, 24 bug fixes and several dependency and migration updates. Here is a look at the highlights.

Spring Boot test starter

A new citrus-spring-boot-test-starter module makes it easier than ever to bootstrap Citrus tests in Spring Boot projects (#1943). Just add the starter dependency and Spring Boot auto-configuration takes care of wiring up the Citrus context, endpoints and test infrastructure — no manual bean definitions required.

Modern JUnit Jupiter test generation

The citrus init command now generates JUnit Jupiter test classes by default (#2004). Previously generated tests used the older JUnit 4 style. New projects start with idiomatic JUnit 5 code out of the box, and the init command also fails early when the target file already exists (#2043) to prevent accidental overwrites.

XSLT-based Spring XML migration tool

A new XSLT-based migration tool converts legacy Spring bean XML tests to the native Citrus XML DSL (#2047). This tool is also available through the Citrus MCP server (#2121), making it easy to integrate into AI-assisted migration workflows.

Extended YAML/XML DSL coverage

Citrus 5.2.1 continues to close the gap between the Java DSL and the YAML/XML DSL with support for several additional transports and actions:

  • Docker actions — build, start, stop and inspect containers directly from YAML and XML tests (#2045)
  • Kubernetes actions — delete pods and execute commands on running containers (#2048)
  • Zookeeper actions — create, get, set and delete znodes from YAML and XML tests
  • FTP, SFTP, RMI and Hamcrest — full YAML/XML support for FTP/SFTP transfers, RMI invocations and Hamcrest matchers (#2058)
  • Server port and URL as test variables — dynamically allocated server ports and URLs are now automatically exposed as test variables in the YAML DSL (#2115)

Playwright enhancements

The Playwright browser testing module gains several new capabilities:

  • Ref locators, within scoping and AI ARIA snapshots — locate elements by ref attribute, scope actions within a parent element, and capture accessibility snapshots for AI-driven test generation (#2074)
  • Screencast options, WebAuthn signCount and shadow DOM page-source — record screencasts during test execution, configure WebAuthn authenticator counters, and extract page source from shadow DOM elements (#2079)

CLI improvements

The citrus run command gains a new --clear option to explicitly clean the work directory, while the default behavior now preserves it between runs (#2044). This makes it easier to inspect intermediate outputs and debug test failures.

AI and tooling support

YAML schemas and action catalogs are now structured so that AI agents and MCP-compatible tools can discover and navigate them automatically (#2119). Combined with the Spring XML migration tool exposed through the MCP server, this makes Citrus a first-class citizen in AI-assisted testing workflows.

Notable fixes

  • Thread safety — TestFlowReporter and JBangSupport.trust are now safe for concurrent test execution (#1999, #2011)
  • Parameterized tests — remaining invocations continue to run after a failure, and parameterized arguments are correctly passed to file-based tests (#2024, #2041)
  • Test variable resolution in endpoints — endpoint initialization now resolves test variables, enabling dynamic endpoint configuration (#2077)
  • Error reporting — improved error messages for operators and unknown variables (#2118), validation of unbalanced function calls (#2039, #2100), and rejection of multiple operations in a single HTTP action (#2108)
  • Finally block reliability — the original test failure is preserved when finally actions also fail (#2112), and the reference resolver is properly injected into finally block action builders (#2087)

Migration updates

  • Citrus test suite migrated from TestNG to JUnit Jupiter (#1873)
  • Spring bean XML integration tests migrated to plain XML DSL (#2123)
  • Deprecated Cucumber and Kafka APIs replaced (#2106)
  • Playwright module aligned with Playwright 1.65 semantics (#2022)

For the full list of changes see the release changelog.

Update

Update the Citrus BOM in your pom.xml:

<dependency>
    <groupId>org.citrusframework</groupId>
    <artifactId>citrus-bom</artifactId>
    <version>5.2.1</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>

Thank you to everyone who contributed to this release!