Working With JMS From Groovy Scripts

Applies to ReadyAPI 3.53, last modified on June 07, 2024

You can use a Groovy Script test step to work with queues, topics and other JMS entities.

Setting JMS Headers for Test Steps

The following code demonstrates how to set the JMS header’s value in a specific test step:


// Replace the test step’s name with the one you need
def myTestStep = testRunner.testCase.getTestStepByName("The sample test step")

def msgID = "foo4711"// Specify the value for header

myTestStep.testRequest.JMSHeaderConfig.messageSelector = "JMSCorrelationID = '${msgID}'"// Setting the header’s value

See Also

JMS Support

Highlight search results