Ask a Question

SoapUI Groovy Script doesn't reflect correct TestStep execution Status

saurabh25281
Regular Visitor

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.

SoapUI-1.JPG

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

SoapUI-2.JPG

 

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.

 SoapUI-3.JPG

 

Integer counter = 1;
Integer delay = 5;
while (counter < 6) {
myTestStepResult = testRunner.runTestStepByName("MQ put_message")
myStatus = myTestStepResult.getStatus()
log.info "  message no: " + counter + " - " + myStatus.toString()
counter++
Thread.sleep(delay * 1000)
}
0 REPLIES 0
cancel
Showing results for 
Search instead for 
Did you mean: