I have checked the Citrus documentation, but I could not find an example. My code is in the following style:
http()
.client(something)
.receive()
.response(HttpStatus.OK)
.messageType(MessageType.JSON);
How can I check a token in the JSON response, that it contains only numbers and letters for instance with regular expressions?
You can use JsonPath expressions in combination with RegExp validation matchers.
Also see documentation here
http://www.citrusframework.org/reference/html/json-path.html http://www.citrusframework.org/reference/html/validation-matchers.html