Forum Discussion

saurabh25281's avatar
Regular Visitor
10 months ago

SoapUI Groovy Script doesn't reflect correct TestStep execution Status

Hi All,


I have a TestStep for sending message to MQ queue using JMS endpoints.

A "JMS Status" assertion validates the response status.

I am trying to execute the TestSteps in continuous loop until 5 times, but the results are strange.


Scenario-1: If the queues are initially enabled & thereafter disabled the TestStep status changes from OK to FAILED which is expected.

Scenario-2: However, if the queues are initially disabled & thereafter enabled the TestStep status doesn't change from FAILED.


Note: All during the TestStep execution, messages are going into MQ queue once they are enabled or withheld if disabled.

Therefore can someone explain where I am going wrong with the script or the configurations.


Below is a snippet of the Groovy Script that I am using.



Integer counter = 1;
Integer delay = 5;
while (counter < 6) {
myTestStepResult = testRunner.runTestStepByName("MQ put_message")
myStatus = myTestStepResult.getStatus() "  message no: " + counter + " - " + myStatus.toString()
Thread.sleep(delay * 1000)
No RepliesBe the first to reply