Xcode 7.2 bug: every other test case being skipped

Has anyone else seen this? I'm consistently having XCTest hang during every other test run on a test device (haven't tried simulator), with the test case failing and resulting in the following error:


UI Testing Failure - App state for <XCUIApplicationProcess: 0x13ded1930 (null) (1267)> is XCApplicationStateRunningActive (3), still not XCApplicationStateNotRunning (1)


Anyone else seeing this? It appears to be happening with:

http://stackoverflow.com/questions/34325297/xcode-ui-tests-are-failing-because-of-xcapplicationstaterunningactive-on-physica

Replies

Anyone still seeing this with the 7.3 beta?

This seems to be better for me under 7.3 beta.

I see the exact same thing on Xcode 7.2 on a slower computer (Mac mini , late 2012). It also fails if you run it as a part of an Xcode server/Bots/CI.


The only scenario where it works is on the latest and greatest hardware (MBP 2015), and only if you run it locally.

I saw this error once in Xcode 7.3 beta.

It's happening to us on a 2015 retina iMac, running the tests on device (an iPhone 6).

Issue appears to have been fixed in Xcode 7.3. Beta 2.

I was able to resolve this issue (xcode 7.2) by removing explicit calls to app.terminate() in my tearDown() method

Happening to me on Xcode 7.2. Have not checked on Xcode 7.3 beta 2

I created a radar 24524204

Can anyone who's filed a radar for this please post the radar number so the rest of us can duplicate it if we are seeing it as well?


If you haven't filed a radar for this can you please do so?

I am seeing this issue consistently when I execute test cases on physcial/device.


My System: OS X El Capitan

XCode: Version 7.2.1 (7C1002)


Inititially I thought the issue is with our App, but when i tested few Sample test cases on Lister App provided by Apple, I was facing same issue. If I run 10 UI Tests, alternate test cases fail with below error:


UI Test Activity:

Terminate <XCUIApplicationProcess: 0x13ee76af0 com.amazon.aaae.Lister (946)>

UI Test Activity:

Assertion Failure: UI Testing Failure - App state for <XCUIApplicationProcess: 0x13ee76af0 (null) (946)> is XCApplicationStateRunningActive (3), still not XCApplicationStateNotRunning (1)


I tried having XCUIApplication().terminate() in tearup, but test case when executing terminate method.


From high level it looks like problem is with terminating the app.

Hi Erdem,


Are you still seeing this issue in Xcode 7.3 beta 3?


Thanks!

I have submitted a bug report and have been asked to test on Xcode 7.3 beta 3. It is fixed!

Radar 24524204 now closed as resolved.

My (closed) radar was duped to this (also closed) radar: 23920068

Working much better in 7.3 beta 3. Hoorah!

Though I'm no longer seeing it on every other test in Xcode 7.3 beta 3, I do still see this happen quite frequently. When it does happen, it tends to happen for all of the remaining tests being run.