Forum Discussion

sonya_m's avatar
sonya_m
SmartBear Alumni (Retired)
4 years ago

[TechCorner Challenge #17] Get a full Raw JMS request

Hello Сommunity!

Check out this new TechCorener task!

Participation rules and the TechCorner Leaderboard can be found here.

 

When sending long JMS messages, they might be shown truncated on the Raw Request and Response tabs in ReadyAPI:

 

 

 

Task: Write a script for RequestFilter.filterRequest event handler to get the full Raw JMS Request message.

Difficulty: 

 

 

Here is a sample of a JMS body:

 

 

{
"feild1":"IT",
"feild2":" accepted",
"feild3":"Test_accepted",
"feild4":"000-111-222",
"feild5":" data3",
"feild6": " data4",
"feild7": " data5"
}

 

 

Best of luck, friends!😊

 

 

A tip:

 

You should be able to get a full response using this piece of code:
def request  = testRunner.getTestCase().getTestStepByName("JMS_TestSTep_Name").getRequestStep().getTestRequest()
def fullJmsMessage = request.getResponse().getMessageReceive().getText()

 

No RepliesBe the first to reply