由于物理设备上的XCApplicationStateRunnin

由于物理设备上的XCApplicationStateRunnin

本文介绍了由于物理设备上的XCApplicationStateRunningActive,Xcode UI测试失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,我添加了一些UI测试。使用一种测试方法一切都很完美,但是当我添加第二种方法时,由于以下错误,测试失败:

In my app I'm adding some UI tests. With one test method everything works perfectly, but when I added second method, the test is failing because of the following error:

我觉得[[[XCUIApplication alloc] init]启动];不会像它想象的那样终止应用。

I feel like [[[XCUIApplication alloc] init] launch]; doesn't terminate the app as it suppose to.

编辑1:

我也注意到,如果我测试完成后,按下我的物理设备上的主页按钮,我可以看到应用程序的2个实例仍然在后台运行。如果我再次尝试启动测试,我会在Xcode中收到消息,因为应用程序null仍在运行,因此无法启动应用程序。这令人沮丧:(

I also noticed, if I press home button on my physical device after test finishes, I can see 2 instances of the app still running on the background. And if I try to start the tests again I get the message in Xcode that it can not start running the app because the app null is still running. This is frustrating :(

有没有人有线索或有类似的问题?

Does anyone have a clue or had a similar issue?

任何形式的帮助非常感谢。

Any kind of help is highly appreciated.

推荐答案

我提交了一份错误报告,并被要求对Xcode 7.3 beta 3进行测试。它已修复!
您可以查看我现在关闭的雷达24524204已解决。

I have submitted a bug report and have been asked to test on Xcode 7.3 beta 3. It is fixed!You can check my radar 24524204‌ that is now closed as resolved.

这篇关于由于物理设备上的XCApplicationStateRunningActive,Xcode UI测试失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 06:59