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:
Groovy
// 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
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