Asynch Messaging Testing Help Please?
Hey!
I've got to test some asynch messaging (non-blocking communication) via Queues and there wont be any responses to assert against.
Before now, the way I've tested asynch messaging is one of the following 3 options.
1. Read the message off the Queue to assert against (although I've never done this using ReadyAPI!, I used JMeter several years ago).
2. Query the underlying Queue table (using JDBC) where the message is persisted and assert against the record in the table (although I've never done this using ReadyAPI!, I used JMeter several years ago)
3. Get Development to create some test stub APIs that hook into the genuine APIs. These stub APIs provide the response I needed to assert against.
SO - Ive used option 3 within ReadyAPI! - but I've never used option 1 or 2 in ReadyAPI!.
Its likely I've got to do option 1 (Read off the Queue to prove content of message) or variations thereof in my new project going forward so I need to work out how to do this.
HOWEVER - I've been reading in the help to work out how to use ReadyAPI! to test asynch messaging - but I notice it keeps mentioning Mockservices, WebHooks - but I'm just not understanding the concept of either using webhooks to test asynch messaging nor the use of MockServices to test asynch messaging.
Can anyone please help out and explain what I'm totally not understanding. there's a huge gap in my knowledge and reading the help isn't well... helping!
This link relates to MockServices for testing asynch messaging in ReadyAPI! - but I just dont understand why mocking a service would help the tester verify the content of the message that was published to the Queue.
This link relates to WebHooks, which seems to indicate webhooks wait for some event on an application or server - but I don't understand how this would help me verify a message on a Queue. If a webhook is waiting for a particular event on a server - does this mean that a webhook could be setup to fire if an event of a message hitting a Queue occurred? Is that what these webhooks are used for in regards to asynch messaging or does it mean something else?
Can anyone help explain what I'm completely missing?
Thanks so much - I really have no idea, so would welcome any/all advice/hints/tips - whatever...really! 🙂
cheers,
rich
Hi richie,
Can you please clarify what async messaging technology you're using? Is it JMS?
If so, here is the Community post that includes script examples of reading a message from the queue:
[TechCorner Challenge #10] Connecting to JMS using Groovy script SOLVED