New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying a DomXmlMessageValidator as validator deactivates XPath validations #385

oweise opened this Issue May 14, 2018 · 0 comments


None yet
3 participants

oweise commented May 14, 2018

When specifying a DomXmlMessageValidator on a HTTP REST Server reveive then subsequent XPath validations are no longer executed, or at least do not influence the outcoming of the test.

Demo test with Citrus 2.7.5:

@ContextConfiguration(classes= ValidatorBugDemoTest.CitrusConfig.class)
public class ValidatorBugDemoTest extends JUnit4CitrusTest {

    public static class CitrusConfig {

        public HttpClient wsClient() {
            return CitrusEndpoints.http()

        public HttpServer backendEndpoint() {
            return CitrusEndpoints.http()

    public void test(@CitrusResource TestRunner testRunner) {

        testRunner.http(action -> {
                    .payload("<doc text=\"hello\"/>")

        testRunner.http(action -> {
                    .validator(new DomXmlMessageValidator())
                    .validate("/doc/@test", "nothello");

This test should fail bc. /doc/@test in sent XML is "hello" , not "nothello".

@svettwer svettwer added this to the SOMEDAY milestone May 14, 2018

@christophd christophd modified the milestones: SOMEDAY, 2.7.6 May 22, 2018

@christophd christophd removed the READY label Jun 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment