Ask a Question

How to check is the TestRunner is still busy

Matthijs
New Member

How to check is the TestRunner is still busy

First let me describe the situation.

Currently I am running SoapUI from a remote desktop.

In Eclipse I built a simple webservice.

All SoapUI has to do is call the webservice and check the answer.

I made a loop which will execute x times.

In that loop the call to the webservice is made and then calls to the scripts that check the answer.

 

testRunner.runTestStepByName("helloName - Request 1")
testRunner.runTestStepByName("Check 1")
testRunner.runTestStepByName("Check 2")

 

Now my problem is the following.

Sometimes (not all the time) the Groovy script would go though the loop several times and then just hang.

In the log of the testcase I can see that the Check 2 was executed and then nothing.

With some help of the log.info I can figure out that the next iteration of the loop is started but the testRunner never executed the new call.

 

At the moment I have managed to 'solve' this problem with a simple 

sleep(250)

 

Somehow after the Check 2 Soap needs some time to process everything before it can run a new testcase.

At this point it might be important to notice that this problem does not show up when I run the testcase locally on my own computer.

So I figure it might have something to to with the status of the testRunner.

Perhaps it is still busy clearing Check 2 when the next iteration of the loop already tells it to start with 

testRunner.runTestStepByName("helloName - Request 1")

Somehow, somewhere SoapUI seems to write the status of the restrunner (or the locking status) to the disc or the RAM, which on a virtual machine seems to take a little longer, 

 

So what do I want to know?

Is there a way in which I can check every millisecond if the status of the testRunner is such that it is available for a new execution?

That way I do  not have to use a hard sleep() and the test can run faster or slower depending on the speed of the machine it is running on.

cancel
Showing results for 
Search instead for 
Did you mean: