Christoph Deppisch created CAMEL-25378:
------------------------------------------
Summary: Add camel-test-citrus component for Citrus message
validation in Camel route tests
Key: CAMEL-25378
URL: https://issues.apache.org/jira/browse/CAMEL-25378
Project: Camel
Issue Type: New Feature
Components: camel-test
Reporter: Christoph Deppisch
Add a new camel-test-citrus test component that integrates with the Citrus
integration test framework (https://citrusframework.org/) to perform message
validation on exchanges arriving at a Camel endpoint.
*Endpoint URI:* {{citrus:validate}} (where {{validate}} is the initial
operation, extensible in future releases).
*Key capabilities:*
* Consumer-side endpoint that validates each arriving exchange using Citrus
message validation
* Supports {{messageType}} option ({{json}}, {{xml}}, {{plaintext}}) to select
the appropriate Citrus validation module
* Users configure expected message templates (body), header validation
expressions, and path validation expressions (JsonPath, XPath) via a *fluent
API on the endpoint* — similar to how MockEndpoint provides methods to verify
processed exchanges
* Propagates exchange properties as Citrus test variables, enabling use of
Citrus functions and validation matchers in expected templates
* Prepares the Citrus runtime context automatically per exchange
*Validation module dependencies:*
The component does *not* bundle Citrus validation modules out of the box. Users
must explicitly add the required validation module dependency for their message
type (e.g., {{citrus-validation-json}}, {{citrus-validation-xml}}) to their
test classpath.
*Scope (initial):*
* Java DSL only (XML/YAML DSL support can follow)
* Consumer-side validation only (producer-side capabilities can follow)
* Complementary to existing camel-test-* modules, not a replacement
*Location:* under {{components/camel-test/}} alongside existing test modules.
*Dependencies:* Uses the Citrus version already managed in Camel (5.0.2).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)