You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question
I have the following testing scenario :
Inbound SFTP -> Mulesoft (SUT) -> Sends message to AMQ
I need to validate if the message send to Anypoint MQ is the same as the test sample
When using this script in other test scenarios it works perfect but it seems that when you have the SFTP -> AMQ the expected and got, are being swapped for some reason :
What I've tried so far
To Debug I added the loggers for actual & expected and there each file is in the proper variable (so not swapped)
Additional information
Maybe update to macOs Sonoma ?
Step for receiving & validating :
<stepthen="^ape-shipments-mule4 transforms and forwards the SV033F message with payload (.*) to Anypoint MQ$"parameter-names="outboundAmqRequestMessage">
<citrus:sleepseconds="1"/>
<!-- Get all messages from AMQ destination -->
<http:send-requestclient="amqMessageClient">
<http:GETpath="/organizations/${amqOrgId}/environments/${amqEnvId}/destinations/${amq.ape-shipments.exchange.shipments.positions}/messages">
<http:paramname="pollingTime"value="10000" />
<http:paramname="batchSize"value="1" />
<http:paramname="lockTtl"value="10000" />
<http:headerscontent-type="application/json"version="HTTP/1.1"accept="*/*">
<http:headername="Authorization"value="Bearer ${amqAccessToken}" />
</http:headers>
</http:GET>
</http:send-request>
<!-- Validate response & conversationId -->
<http:receive-responseclient="amqMessageClient"timeout="30000">
<http:headersstatus="200"reason-phrase="OK"version="HTTP/1.1" />
<http:bodytype="json">
<http:validate>
<http:json-pathexpression="$..properties.conversationId"value="@assertThat(not(isEmptyString())@"/>
</http:validate>
</http:body>
<!-- Extract body into variables for later usage -->
<http:extract>
<http:bodypath="$..headers.messageId"variable="message_id" />
<http:bodypath="$..headers.lockId"variable="lock_id" />
<http:bodypath="$"variable="amqResponseMessage" />
</http:extract>
</http:receive-response>
<!-- "Acknowledge" message and remove from AMQ destination -->
<http:send-requestclient="amqMessageClient">
<http:DELETEpath="/organizations/${amqOrgId}/environments/${amqEnvId}/destinations/${amq.ape-shipments.exchange.shipments.positions}/messages">
<http:headerscontent-type="application/json"version="HTTP/1.1"accept="*/*">
<http:headername="Authorization"value="Bearer ${amqAccessToken}" />
</http:headers>
<http:bodytype="json">
<http:resourcefile="com/aperam/citrus/${project.name}/testfiles/shared/amq/amqDELETEMessagesRequest.json"charset="UTF-8" />
</http:body>
</http:DELETE>
</http:send-request>
<!-- Validate Response message -->
<citrus:create-variables>
<citrus:variablename="amqResponseType"value="json" />
<citrus:variablename="filePathAmqResponseMessage"value="src/test/resources/com/aperam/citrus/${project.name}/testfiles/${outboundAmqRequestMessage}" />
</citrus:create-variables>
<citrus:groovyresource="com/aperam/citrus/${project.name}/scripts/validateAMQResponseMessage.groovy" />
</step>
The text was updated successfully, but these errors were encountered:
@bbortt it's used in company env, we use a parent pom for dependencies and updating to 4.0.0-M2 would mean updating over 100 apps and making sure they work, but I can verify with a dummy project
@christophd It isn't going to help in this case. The SFTP message is different from the AMQ message because Mulesoft (SUT) transforms the message to another format.
I need to check what comes out of AMQ against a sample to make sure MuleSoft made the right transformation
Citrus Version
groovy: 3.4.0
citrus: 3.4.0
Question
I have the following testing scenario :
Inbound SFTP -> Mulesoft (SUT) -> Sends message to AMQ
I need to validate if the message send to Anypoint MQ is the same as the test sample
Therefore I wrote a script that looks like this :
When using this script in other test scenarios it works perfect but it seems that when you have the SFTP -> AMQ the expected and got, are being swapped for some reason :
What I've tried so far
To Debug I added the loggers for actual & expected and there each file is in the proper variable (so not swapped)
Additional information
Maybe update to macOs Sonoma ?
Step for receiving & validating :
The text was updated successfully, but these errors were encountered: