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

Cannot use context variables for XPath in message extractor #266

gucce opened this Issue Jul 13, 2017 · 0 comments


None yet
2 participants

gucce commented Jul 13, 2017


In my test suite (Citrus 2.7.1, XML tests) I extract a variable using XPath. The problem is that I cannot use a test context variable for the XPath definition like this:

<variable name="XPathCorrId" value="/some/xpath/text()"/>
<receive endpoint="jmsEndpoint">
        <message path="${XPathCorrId}" variable="downloadCorrId"/>

Citrus does not replace the text context variable ${XPathCorrId} with its content but tries to use it as is. This lets Citrus think ${XPathCorrId} is a JPath definitions, see log:

DEBUG athVariableExtractor| Reading JSON elements with JSONPath

It would be nice to be able to use variables for XPath definitions since sometimes you have the same XPath for different receive actions.

@christophd christophd added the READY label Jul 24, 2017

@christophd christophd added this to the v2.7.3 milestone Jul 24, 2017

@christophd christophd closed this in c84a994 Oct 5, 2017

@christophd christophd removed the READY label Oct 5, 2017

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