Xcode UI tests - Lost connection to test manager service

倖福魔咒の 提交于 2019-11-29 16:56:54

问题


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.


回答1:


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



回答2:


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.



来源:https://stackoverflow.com/questions/32193044/xcode-ui-tests-lost-connection-to-test-manager-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!