views:

19

answers:

0

Hello,

I have about 400 unit tests that I have written for my Android application. If I run the tests package by package, everything works fine and all my tests pass. However, if I try to run them all at once, eventually (about 360 tests in), Android starts spitting out !!! Failed Binder Transaction Errors !!!. After about 10-20 of these errors, the process for the application I am testing gets killed and the unit tests never even complete.

I should note that during this time Eclipse reports Collecting test information in the Console. I think that is odd because it shows that it is running tests even though the JUnit UI doesn't reflect that. When everything works properly, during the Collecting test information phase I see the tests run, the JUnit UI then comes up, and then all the tests are run again (I know this by reading logcat). That is (I think) a separate issue, but I felt I would mention it if anybody knew what that was about.

After doing some quick reading apparently this often occurs when transferring large amounts of data between processes. All my tests are of custom classes that actually do not exercise any piece of Android functionality (hence my confusion). Does anyone have any suggestions on how to resolve this?

If it helps, I am writing a bunch of tests that involve generating and parsing XML. So, in a lot of my unit test classes I do sometimes have quite a few static final Strings fields containing small amounts of text for parse tests. Those strings often get passed into an XmlPullParser that gets passed into the tested application.