Ask a Question

Advice on how to read multiple messages from queue

SOLVED
MadSaid
Contributor

Advice on how to read multiple messages from queue

Hi,

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:

  1. Check if all repeating groups items are correctly processed
  2. Total nr of messages in targetQueue should match
  3. 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!

1 ACCEPTED SOLUTION

Accepted Solutions
MadSaid
Contributor

Re: Advice on how to read multiple messages from queue

Hi @richie

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.

 

View solution in original post

2 REPLIES 2
richie
Community Hero

Re: Advice on how to read multiple messages from queue

Hey @MadSaid,

I can probably help to answer this, but i'm struggling to think cos i have manflu at moment.

First thing i need to ask. How are the messages transformed? Are you using an ESB to do the transformations? Second, is the message exchange pattern asynch or synch messaging? If asynch, then youll need your developers to generate an api for you to use to test your stuff as you wont get a response. Even with synch messaging (which does generate a response) it might not give you what you need to test it, so additional apis enabling you to test might still be required.

Waiting on your response,

Cheers,

richie
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
MadSaid
Contributor

Re: Advice on how to read multiple messages from queue

Hi @richie

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.

 

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: