Issues receiving results of network operation in list using Robotium

37 views Asked by At

I'm trying to get automated blackbox testing of my Android application working.

What is happening is that I run a network operation in an asynctask every x minutes. Once it is finished, the results are put into a list. Without robotium running, this is working perfectly. However with robotium running, let's say I have it set to run every 2 minutes, results might come back in up to 5 min or another random amount of time.

I believe that one of 3 things are happening, however I don't know why or how to fix it.

  1. The robotium sleep() method is somehow also pausing my asynctask/background thread.
  2. The robotium methods are somehow interfering with a broadcast receiver I use to notify that new results are in to add them to the list.
  3. Something else is going on...

Does anyone have any suggestions? My current approach is to just call the sleep method for MUCH longer than is expected, but it seams random whether or not new data will come in. And if it does it is usually MUCH later than it was expected to return. (Remember that it works to the second, perfectly without using robotium.

Cheers

0

There are 0 answers