Quick does not work well with the Xcode 9 test runner

Created on 20 Sep 2017  路  15Comments  路  Source: Quick/Quick

  • [x] I have read CONTRIBUTING and have done my best to follow them.

What did you do?

Run all tests (鈱楿) from Xcode 9.

What did you expect to happen?

Quick Specs should have a green (for passing) or red (for failing) glyph in the left hand gutter of Xcode's editor windows, like they did in Xcode 8 and earlier. Ideally, one per it(), describe() and context() block, but I'd take one at the top level spec() as a good start. I should be able to click on these to (re-)run the individual block.

Also, the test navigator does not consistently show the list of specs correctly. Sometimes they're all there, sometimes they're not, sometimes they're there but ghosted. This seems to work well for plain XCTests.

What actually happened instead?

No glyphs are evident. All you get is a red X glyph on a failed test. Test Navigator does not always show a complete and correct list of the available specs.

Environment

List the software versions you're using:

  • Quick: 1.1.0
  • Nimble: 7.0.1
  • Xcode Version: Version 9.0 (9A235)
  • Swift Version: 4.0

Please also mention which package manager you used and its version. Delete the
other package managers in this list:

  • Carthage: 0.25.0

Note: fit() and fdescribe() are inconvenient stopgap measures at best. I have a nice IDE in front of me and I'd like to use it!

I realize this may be more of an issue of the hooks Xcode makes available for Quick to integrate with and what I want may not be possible right now, but I'd like to have this issue here to link the radar to if this is the case.

Most helpful comment

This seems to be broken again on Xcode 9.2 (9C40b)

All 15 comments

maybe related to #744 ?

This is probably related to #219

Got the same issue, for me even after running the tests non of the Quick generated tests show up in the navigator.

I managed to get it to be a bit more usable in Xcode 9 by adding a dummy test method to my Quick specs, afterwards I can at least run a specific file which is better than having to run the entire test suite...

````swift
class MyTest: QuickSpec {
override func spec() {
describe("raw segment recorder") {
....
}
}

public func testDummy() {}

}

This is a neat trick @ngutman and now I can run the tests from the icons in the editor gutters, but when my tests pass I get a green diamond with a "-" in it, rather than a green diamond with a tick 馃槥. Putting in a XCTestAssertTrue(true) as a body in my dummy test doesn't even seem to help.

Confirmed here on Xcode 9GM. Unless there is at least one func test...() {} XCTest then Quick test files will not appear in the test navigator at all. Even after adding a funny test method, I had to clear derived data and restart Xcode to get them to appear.

+1

This seems to now be working fine in Xcode GM 9.1 so no need to add the dummy tests.

This seems to be broken again on Xcode 9.2 (9C40b)

This is broken on Xcode 9.2.1 too. I just started getting into Quick and nothing seems to be working like the tutorials and GitHub page says it should. The test don't appear in the sidebar, beforeSuite never called and running it always says test succeeded.

Working fine here on Version 9.2 (9C40b)

I eventually got it to work. I literally had to remove everything and do it all over again to make it work! Just happy to be testing with Quick!

Same issue on Version 9.2 (9C40b), sometimes restart does help. Also running one specific test file works fine. 鈱楿 just ignores most of Quick tests.

Closing this as the reported issue, how to reproduce, and so on are unclear.

The same issue is happening in XCode 11.2. Also, tests aren't even running

Xcode 12.4 also. It looks like this is really being tracked in #219 and this openradar.

Was this page helpful?
0 / 5 - 0 ratings