Advice on how to read multiple messages from queue
I have the following situation:
- A XML message is put on a sourceQueue. There is a repeating group in this XML message
- An adapter process this message and puts multiple XML messages on a targetQueue. For each repeating node in the sourceQueue a XML message is put on the targetQueue, after doing some transformations.
What do I want to test with SoapUI Pro:
- Check if all repeating groups items are correctly processed
- Total nr of messages in targetQueue should match
- The transformations should be correct.
What is the best approach for this with SoapUI Pro? I can loopt through the targetQueue with a groovy script. Are there other options?
Additional question: when I am monitoring the tartgetQueue (with groovy script) and other software (adapter) is also monitoring/reading the queue. How do I make sure that I get the message? Cause when the other software get's it before me, I will NOT get it. Do I just stop that piece of software in order to do my test? Other options?
Thanks in advance!
Thanks for your answer. I have managed to create a script for this. I have used the code on this page. I used XmlSluper() to combine the messages on the queue to 1 big xml. Then I did all my checks (comparing source and target). When I need to test I request the developers to stop the adapter, so that I can pick up the messages. We might create a separate queue in the future for testing purpose.