Quick icon indicating copy to clipboard operation
Quick copied to clipboard

Quick break the "Run single test under cursor" feature of Xcode

Open rainux opened this issue 7 years ago • 2 comments

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

What did you do?

  • Create an empty new Xcode project, add some print() statements in the default tests, so you know which test you have run.
  • Follow README of Quick to install Quick with CocoaPods.
  • Open the default test file XXXTests.swift, place cursor under any test function, press ⌃⌥⌘ U.

What did you expect to happen?

Only the test function under cursor should be run.

What actually happened instead?

All test functions has run, you can check logs in console to confirm.

Environment

List the software versions you're using:

  • Quick: 1.1.0
  • Nimble: 7.0.0
  • Xcode Version: 8.3.2
  • Swift Version: Xcode Default

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

  • Cocoapods: 1.2.1

rainux avatar Jun 02 '17 11:06 rainux

You are probably looking for:

https://github.com/Quick/Quick/blob/master/Documentation/en-us/QuickExamplesAndGroups.md#temporarily-running-a-subset-of-focused-examples

angerman avatar Aug 08 '17 03:08 angerman

@angerman: Thank you, indeed that's the solution I'm currently using. But it require code change, which is inconvenient and not flexible.

rainux avatar Aug 08 '17 07:08 rainux

I'm going to close this.

  1. Since some time late in Quick 6's lifecycle, we have supported running an individual test via Xcode's test navigator.
  2. Xcode does not have a way to show inline test gems for individual Quick tests. I file radars with Apple every Xcode version, and I have yearly labs with them during WWDC, where I once again ask them about this feature. If they provide an API for us to specify inline test gems, we will 100% adopt it.

younata avatar Jul 03 '23 04:07 younata