Xcode UI tests - Lost connection to test manager service
Asked Answered
E

2

16

Sometimes while running my UI tests, I get the following error Lost connection to test manager services. No logs or anything. Happens randomly. I would provide more information but I just don't have it because of the nature of the error.

Using Xcode 7 beta 5.

Edlun answered 24/8, 2015 at 22:58 Comment(3)
Any luck with this? I'm getting the same kind of error, even in the GM.Gillett
@Gillett Nah, man. Tumbleweed. :( I just shortened up the tests so that it doesn't get to the point at which it usually breaks down.Edlun
Hey so hopefully this helps. In our case, it happened in a unit test class which we had for networking stuff. We used Nocilla for our tests. In our instance, we saw this happen because our network error test tested a cancelled request, followed by a timeout request. I think something's changed in request cancelation for iOS 9. In our case, I believe it happened because the stubbed request processed too fast, before our test case could cancel it. This wrecked the next test and led to this error. I know it's a long shot but I hope this helps. As of now we've removed the cancelation test.Gillett
T
4

The error appear for every async operations made in tests. It can be:

  1. Operation on non existing object
  2. dispatch_after
  3. Network operations with wrongly assign block handler
Tablet answered 18/11, 2015 at 14:26 Comment(0)
P
0

I was getting the same error when running UI tests written in Swift. It turned out that the memory usage was increasing constantly when running a longer test (no memory release). When memory had been exhausted, the device "Lost connection to test manager services."

The solution? Using 'autoreleasepool' in its Swift version, in proper places.

Presignify answered 9/3, 2016 at 22:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.