I did the following setup in citrus-context.xml file to parameterize but it does only the value we set in endpoint.properties file. This needs to be dynamic nature in my case and URL should come from client request. Is that possible to configure dynamically? like wanted to use same automation code for two different domain url endpoints for dev and qa enviroments.
<citrus-http:client
id="service_endpoint"
request-url="${Service.Endpoint.URL}"
request-method="GET"
content-type="text/xml"
charset="UTF-8"
timeout="60000" />
endpoint.properties file
<context:property-placeholder location="classpath:endpoint.properties"/>
You can use the
endpointUriResolver
on the http-client endpoint as follows:And the set the endpoint request URL in the test action as special header: