Attempting to run multiple tests using Xcode's new UI testing fails

本秂侑毒 提交于 2019-12-05 19:18:10

I have faced the same issue. It seems that, at least in my case, application had never been terminated.

I solved it by putting the following statement in the setUp() method:

continueAfterFailure = false

This should stop a running test process after first failure.

I cannot post a comment, so I will try to answer your question while getting some clarification.

I have faced this issue when running on physical devices. On simulator I did not face this issue. So are you facing this issue when running on device or simulator or both?

If its a device, then there is a known bug which has been reported to Apple. To overcome this issue, at runtime I have inserted dummy test cases between two genuine test cases.

user2142193

Did you include a

func tearDown() { super.tearDown() }

function?

It's needed to terminate the app state after each test before it is re-initialized by the

func setUp() { super.setUp(); XCUIApplication().launch }

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