Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report skipped tests to Xcode #1098

Merged
merged 2 commits into from
Apr 27, 2022

Conversation

amomchilov
Copy link
Contributor

@amomchilov amomchilov commented Sep 1, 2021

The PR should summarize what was changed and why. Here are some questions to
help you if you're not sure:

  • What behavior was changed?

    When running on macOS, skipped tests will be reported in the Xcode test navigator, like so:

    image

    The skipped line will not be marked in the source code editor. It appears that Xcode only does that for statically defined tests (those marked static test), not runtime tests (those marked run-time test), which is what Quick uses exclusively.

    Future direction: when some tests are "focused", should we mark all other tests as skipped?

  • What code was refactored / updated to support this change?

    The general error-handling path was extracted into a private reportFailedTest method.

  • What issues are related to this PR? Or why was this change introduced?

    Resolves Feature request: Mark skipped tests as skipped in Xcode. #1093

Checklist - While not every PR needs it, new features should consider this list:

  • Does this have tests?
  • Does this have documentation? Idk, Should it?
  • Does this break the public API (Requires major version bump)? No.
  • Is this a new feature (Requires minor version bump)?

Copy link
Contributor Author

@amomchilov amomchilov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ikesyo , could you please give some early feedback on my first draft?

Also, do you have any advice on how I should go about testing this?

Sources/Quick/Example.swift Outdated Show resolved Hide resolved
Sources/Quick/Example.swift Outdated Show resolved Hide resolved
Sources/Quick/Example.swift Outdated Show resolved Hide resolved
Copy link
Member

@ikesyo ikesyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please fix the followings at first?

  • indentation: use spaces over tabs
  • SwiftLint violations (you can see them in the "Files changed" tab)
    • e.g. image

Sources/Quick/Example.swift Outdated Show resolved Hide resolved
Sources/Quick/Example.swift Outdated Show resolved Hide resolved
@amomchilov amomchilov force-pushed the Report-skipped-tests-to-Xcode branch 2 times, most recently from e083d1c to 6b8dfa0 Compare September 24, 2021 12:49
@amomchilov
Copy link
Contributor Author

amomchilov commented Sep 24, 2021

Could you please fix the followings at first?

@ikesyo I sure can! (And I did.) Though this is still an early-stages draft. I was less concerned about the linting, I'm worried more about the substance.

I was hoping you could give me some guidance on how to write tests for this.

@jessesquires jessesquires added this to the v5.0.0 milestone Apr 14, 2022
@jessesquires
Copy link
Member

Hey @amomchilov! 👋🏼

I'm a new maintainer here trying to get v5.0 released. This looks like a great change and the diff is pretty small, so I think we can include it.

Are you willing and interested in following up on this fix?

@jessesquires
Copy link
Member

I have rebased the branch on main for you

@jessesquires jessesquires modified the milestones: v5.0.0, v6.0.0 Apr 14, 2022
@jessesquires jessesquires added stale Old WIP Work-in-progress labels Apr 14, 2022
@amomchilov
Copy link
Contributor Author

Thanks @jessesquires, I'd love to get this moving

Are you willing and interested in following up on this fix?

I am, but I got stuck, and never heard back. My qualm still exists, I don't know to properly cover this with a test.

Could you help with that?

@amomchilov amomchilov force-pushed the Report-skipped-tests-to-Xcode branch from fbf0b5e to 0b8d21c Compare April 17, 2022 16:28
@amomchilov
Copy link
Contributor Author

I rebased again. There's two outstanding issues:

  1. Testing
  2. Deciding what to do about QuickSpec.current.testRun. Is it safe to force-unwrap it?

@jessesquires jessesquires removed the stale Old label Apr 17, 2022
@jessesquires
Copy link
Member

Thanks @amomchilov ! 🙌🏼

I rebased again. There's two outstanding issues:

Testing

@younata Do you have any thoughts here?

Deciding what to do about QuickSpec.current.testRun. Is it safe to force-unwrap it?

I left comments in-line.

@jessesquires
Copy link
Member

I would probably be ok omitting tests for this since it is a bit odd and doesn't seem like a massive risk.

Also, ignore the Danger check. The failure is expected for forks.

@jessesquires
Copy link
Member

Looks like the SwiftPM failures are valid.

@amomchilov amomchilov force-pushed the Report-skipped-tests-to-Xcode branch from 0b8d21c to c618b9a Compare April 17, 2022 21:06
@amomchilov
Copy link
Contributor Author

amomchilov commented Apr 17, 2022

I would probably be ok omitting tests for this since it is a bit odd and doesn't seem like a massive risk.

There's a certain irony to a test framework not being well tested, isn't there? 😛

Looks like the SwiftPM failures are valid.

Ah yes, NSStringFromSelector is only available to Linux. I gated it.

Let's see what CI says this time

@jessesquires jessesquires marked this pull request as ready for review April 17, 2022 21:59
@younata
Copy link
Member

younata commented Apr 18, 2022

Testing
@younata Do you have any thoughts here?

Yes! Similar to how we verify that test failures are reported to Xcode (see ItTests.testImplicitErrorHandling()), we can add another set of fixture tests that do the right thing and then verify with the test run that the correct skip count was recorded.

Something like this (I have not tried to run this code)

// This is the fixture
final class FunctionalTests_SkippingTestsSpec: QuickSpec {
    override func spec() {
        it("supports skipping tests") { XCTSkip("This test is intentionally skipped") }
        it("supports not skipping tests") { }
    }
}

final class ItTests: // ...
    func testSkippingExamplesAreCorrectlyReported() {
        let result = qck_runSpec(FunctionalTests_SkippingTestsSpec.self)!
        XCTAssertTrue(result.hasSucceeded)
        XCTAssertEqual(result.executionCount, 2)
        XCTAssertEqual(result.skipCount, 1)
        XCTAssertEqual(result.totalFailureCount, 0)
    }
    // ...

@jessesquires
Copy link
Member

@younata thank you! 🙌🏼

@amomchilov looks like CI is ✅ now! 🎉 Let's just implement @younata's testing suggestion and then we can merge.

@jessesquires jessesquires added enhancement and removed WIP Work-in-progress labels Apr 18, 2022
@amomchilov amomchilov force-pushed the Report-skipped-tests-to-Xcode branch from c618b9a to 486331d Compare April 19, 2022 22:48
@amomchilov
Copy link
Contributor Author

This fails in some CI configurations, but not others. I can't figure out the cause, any ideas?

@younata
Copy link
Member

younata commented Apr 19, 2022

Maybe the API for marking tests as skipped changed in Xcode 12.5? All those test failures are referencing an Xcode 12.4 toolchain.

I'm ok with skipping these tests (hehe) on Xcode 12.4, especially considering that #1138 means we'll be dropping Xcode <13 anyway.

@jessesquires
Copy link
Member

Maybe the API for marking tests as skipped changed in Xcode 12.5? All those test failures are referencing an Xcode 12.4 toolchain.

I vaguely remember seeing some tests that only ran for specific Xcode versions, but maybe that was something else?

Is there a good way to gate the tests to be ignored/skipped on Xcode 12.4?

I'm ok with skipping these tests (hehe) on Xcode 12.4, especially considering that #1138 means we'll be dropping Xcode <13 anyway.

I'm ok with this too, but I'd like to do the following:

  1. Let's submit a new PR that drops Xcode 12.4 support. This would mean updating any relevant code, as well as the GH workflows.
  2. Merge that PR, then rebase this PR on top of it.

@amomchilov
Copy link
Contributor Author

amomchilov commented Apr 20, 2022

I'm ok with skipping these tests (hehe) on Xcode 12.4

How would I do that? Is there a way to make macros around Xcode versions?

EDIT: nvm, i posted this without GitHub refreshing and showing that prev comment

@amomchilov
Copy link
Contributor Author

amomchilov commented Apr 23, 2022

I found the issue with Xcode 12.4. Their API was just slightly different:

XCTSkippedTestContext used to have:

  • filePath: NSString
  • lineNumber: NSString

Which was passed to -[XCTestRun recordSkipWithDescription:inFile:atLine:].

After Xcode 12.4, this filePath and lineNumber was extracted into a new sourceCodeContext: XCTSkippedTestContext property, which is passed directly to a new method: -[XCTestRun recordSkipWithDescription:sourceCodeContext:].

I added a shim to support Xcode 12.4, because it was pretty straight forward. We can ship this now (it should all be green! :D). In the future, if we want to go out of our way to drop 12.4, we can delete this shim

Copy link
Member

@jessesquires jessesquires left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much @amomchilov ! 🙌🏼

@amomchilov amomchilov force-pushed the Report-skipped-tests-to-Xcode branch from 67de9a3 to 8eed7cd Compare April 23, 2022 19:01
@amomchilov
Copy link
Contributor Author

Ah, I forgot to make some Objective-C dependant code to be guarded by canImport(Darwin). Fixed.

@amomchilov
Copy link
Contributor Author

Third time's the charm?

@amomchilov amomchilov force-pushed the Report-skipped-tests-to-Xcode branch from 8e29292 to 759d2d0 Compare April 23, 2022 19:39
@amomchilov
Copy link
Contributor Author

Woohoo, we're green!

@ikesyo requested changes a while ago, but apart from that, I think this is ready to merge

@amomchilov
Copy link
Contributor Author

@jessesquires What do we do if @ikesyo doesn't respond to re-review this?

@jessesquires
Copy link
Member

jessesquires commented Apr 25, 2022

What do we do if @ikesyo doesn't respond to re-review this?

It's all good, no worries! We only need 1 approval.

I'll merge this tomorrow -- and potentially tag the v5.1 release (still deciding on that and coordinating with Nimble).

Copy link
Member

@ikesyo ikesyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👏

@amomchilov
Copy link
Contributor Author

@jessesquires Was it decided whether this will be tagged 5.1, or when it would be merged?

@jessesquires jessesquires merged commit 60bef30 into Quick:main Apr 27, 2022
@jessesquires
Copy link
Member

Thanks @amomchilov ! 💯

Decided to just keep this for v6.0 -- unfortunately I don't have capacity to do a v5.1 right now, and we haven't landed any other big changes. 😊

@jessesquires
Copy link
Member

But, there isn't a ton of work to do for v6.0 -- so we can probably get that out within the next few months.

@jessesquires
Copy link
Member

@amomchilov invited you to be a contributor 😄

younata pushed a commit to younata/Quick that referenced this pull request Jul 1, 2022
The PR should summarize what was changed and why. Here are some questions to
help you if you're not sure:

 - What behavior was changed?
 
     When running on macOS, skipped tests will be reported in the Xcode test navigator, like so:
  
    <img width="206" alt="image" src="https://user-images.githubusercontent.com/5703449/131738975-fbed05b2-95e9-4703-a22d-a1076e500990.png">
 
    The skipped line will *not* be marked in the source code editor. It appears that Xcode only does that for statically defined tests (those marked <img width="16" alt="static test" src="https://user-images.githubusercontent.com/5703449/131739328-cdb175e5-abcb-422d-bdf1-c80583c918b1.png">), not runtime tests (those marked <img width="16" alt="run-time test" src="https://user-images.githubusercontent.com/5703449/131739332-740396a7-e2b6-4f4e-acff-d49d079db389.png">), which is what Quick uses exclusively.
  
     Future direction: when some tests are "focused", should we mark all other tests as skipped?

 - What code was refactored / updated to support this change?
 
     The general error-handling path was extracted into a private `reportFailedTest` method.
   
 - What issues are related to this PR? Or why was this change introduced?

    Resolves Quick#1093

Checklist - While not every PR needs it, new features should consider this list:

 - [x] Does this have tests?
 - [ ] Does this have documentation? *Idk, Should it?*
 - [ ] Does this break the public API (Requires major version bump)? No.
 - [x] Is this a new feature (Requires minor version bump)?
younata pushed a commit that referenced this pull request Jan 11, 2023
The PR should summarize what was changed and why. Here are some questions to
help you if you're not sure:

 - What behavior was changed?
 
     When running on macOS, skipped tests will be reported in the Xcode test navigator, like so:
  
    <img width="206" alt="image" src="https://user-images.githubusercontent.com/5703449/131738975-fbed05b2-95e9-4703-a22d-a1076e500990.png">
 
    The skipped line will *not* be marked in the source code editor. It appears that Xcode only does that for statically defined tests (those marked <img width="16" alt="static test" src="https://user-images.githubusercontent.com/5703449/131739328-cdb175e5-abcb-422d-bdf1-c80583c918b1.png">), not runtime tests (those marked <img width="16" alt="run-time test" src="https://user-images.githubusercontent.com/5703449/131739332-740396a7-e2b6-4f4e-acff-d49d079db389.png">), which is what Quick uses exclusively.
  
     Future direction: when some tests are "focused", should we mark all other tests as skipped?

 - What code was refactored / updated to support this change?
 
     The general error-handling path was extracted into a private `reportFailedTest` method.
   
 - What issues are related to this PR? Or why was this change introduced?

    Resolves #1093

Checklist - While not every PR needs it, new features should consider this list:

 - [x] Does this have tests?
 - [ ] Does this have documentation? *Idk, Should it?*
 - [ ] Does this break the public API (Requires major version bump)? No.
 - [x] Is this a new feature (Requires minor version bump)?
renovate bot referenced this pull request in cgrindel/rules_swift_package_manager Jul 7, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [Quick/Quick](https://togithub.com/Quick/Quick) | major | `from:
"5.0.1"` -> `from: "v7.1.0"` |

---

### Release Notes

<details>
<summary>Quick/Quick (Quick/Quick)</summary>

### [`v7.1.0`](https://togithub.com/Quick/Quick/releases/tag/v7.1.0)

[Compare
Source](https://togithub.com/Quick/Quick/compare/v7.0.2...v7.1.0)

### Highlights

#### New Features

- You can now use `throw` in `beforeEach`, `justBeforeEach`, and
`afterEach` blocks.
- Quick now suggests to XCTest that tests run in the order they are
defined in.

#### Fixes

- `beforeEach` blocks specified in configurations are now run in
AsyncSpec tests.
- `xitBehavesLike(_ name: String)` is now available in `QuickSpec` and
`Behavior`.

### Autogenerated ChangeLog

#### What's Changed

- Bump danger from 9.3.0 to 9.3.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Quick/Quick/pull/1224](https://togithub.com/Quick/Quick/pull/1224)
- Ensure beforeEach in Configuration run for AsyncSpec by
[@&#8203;junmo-kim](https://togithub.com/junmo-kim) in
[https://github.com/Quick/Quick/pull/1228](https://togithub.com/Quick/Quick/pull/1228)
- Allow beforeEach, justBeforeEach, and afterEach in Swift to throw by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1229](https://togithub.com/Quick/Quick/pull/1229)
- Improve documentation for installing Quick and Nimble via Cocoapods in
the README. by [@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1231](https://togithub.com/Quick/Quick/pull/1231)
- Make a public xitBehavesLike(\_ name: String) for SyncDSLUser by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1230](https://togithub.com/Quick/Quick/pull/1230)
- Attempt to run tests within a QuickSpec or AsyncSpec in the order they
are defined in by [@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1232](https://togithub.com/Quick/Quick/pull/1232)

#### New Contributors

- [@&#8203;junmo-kim](https://togithub.com/junmo-kim) made their first
contribution in
[https://github.com/Quick/Quick/pull/1228](https://togithub.com/Quick/Quick/pull/1228)

**Full Changelog**:
Quick/Quick@v7.0.2...v7.1.0

### [`v7.0.2`](https://togithub.com/Quick/Quick/releases/tag/v7.0.2)

[Compare
Source](https://togithub.com/Quick/Quick/compare/v7.0.1...v7.0.2)

This is a bug fix release that primarily fixes a conflict in how Nimble
defines `FileString` and how Quick defines `FileString` when you use
both via Swift Package Manager. It also fixes a number of warnings
people who install Quick via Swift Package Manager on Darwin will
receive.

#### What's Changed

- Correct a few places where we falsely assume "SWIFT_PACKAGE" == not
darwin by [@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1223](https://togithub.com/Quick/Quick/pull/1223)

**Full Changelog**:
Quick/Quick@v7.0.1...v7.0.2

### [`v7.0.1`](https://togithub.com/Quick/Quick/releases/tag/v7.0.1):
7.0.1 - re-allow async calls in AsyncSpec&#x27;s xit

[Compare
Source](https://togithub.com/Quick/Quick/compare/v7.0.0...v7.0.1)

This fixes an oversight where you couldn't use async closures with
`xit`. Thanks [@&#8203;stonko1994](https://togithub.com/stonko1994) for
calling this out!

#### What's Changed

- Allow xit in the Async DSL to take in async closures by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1220](https://togithub.com/Quick/Quick/pull/1220)

**Full Changelog**:
Quick/Quick@v7.0.0...v7.0.1

### [`v7.0.0`](https://togithub.com/Quick/Quick/releases/tag/v7.0.0): -
AsyncSpec and Human-Readable Test Selectors

[Compare
Source](https://togithub.com/Quick/Quick/compare/v6.1.0...v7.0.0)

### Highlights

#### Async Test Changes

Quick 7 changes how Async tests are run. Instead of forcing all tests to
run in an async context, Quick 7 provides a separate Spec class for
Async Tests. Create an `AsyncSpec` subclass, and all tests inside of
that subclass will run in an async context. Tests inside of `QuickSpec`
subclasses will have a similar behavior to what was in Quick 5.

Additionally, Quick 7 changes how the DSL is defined slightly. In Quick
6 and before, the DSL was defined as a series of global functions,
available to be called anywhere. In Quick 7, these functions were moved
to be static methods on the new `SyncDSLUser` (which `QuickSpec`,
`Behavior`, and `QuickConfiguration` conform to) and `AsyncDSLUser`
(which `AsyncSpec` and `AsyncBehavior` conform to) protocols. This
allows us to make sure that you are using the correct DSL for the
context, and was necessary for this approach.

For example:

```swift
class SynchronousSpec: QuickSpec {
    override class func spec() {
        it("runs synchronously, as you'd expect") {
            var ocean: [String] = []
            DispatchQueue.main.async {
                ocean.append("dolphins")
                ocean.append("whales")
            }
            expect(ocean).toEventually(contain("dolphins", "whales"))
        }
    }
}

class AsynchronousSpec: AsyncSpec {
    override class func spec() {
        it("runs the test in an async context") {
            var ocean: [String] = []
            DispatchQueue.main.async {
                ocean.append("dolphins")
                ocean.append("whales")
            }
            await expect(ocean).toEventually(contain("dolphins", "whales"))
        }
    }
}
```

#### Unencoded Test Selectors

Furthermore, Quick 7 changes how test selectors are generated for
`QuickSpec`. Now, both `AsyncSpec` and `QuickSpec` will use the
unencoded test names as the test selectors. Test selectors are now
generated by joining the `describe`/`context` blocks leading up to the
`it` block with ", ". This makes test names immensely easier to read.
For example, with the following spec:

```swift
class MySpec: QuickSpec {
    override class func spec() {
        describe("some feature") {
            context("in one case") {
                it("has a behavior") {}
            }

            context("in another case") {
                it("doesn't have the earlier behavior") {}
            }
        }
    }
}
```

will generate the following test selectors:

-   `some feature, in one case, has a behavior`
-   `some feature, in another case, doesn't have the earlier behavior`

You can disable this change by setting the
`QUICK_USE_ENCODED_TEST_SELECTOR_NAMES` environment variable.

#### Migrating Suggestions

Quick 7 is not a drop-in migration from either Quick 5 or Quick 6. Quick
5 users will have a slightly easier time upgrading, but due to `spec`
being defined as a class method instead of an instance method, there
will still be changes.

Doing a Find & Replace of `override func spec` with `override class func
spec` will take care of the low-hanging fruit. If you have any test
helpers that exist as properties or methods of your QuickSpec
subclasses, the you will need to either move them inside of the `spec`
function, or outside to another scope. For Objective-C users, this is,
for the most part, a drop-in replacement. You will only need to do
anything if you do not use the `QuickSpecBegin` and `QuickSpecEnd`
macros (in which case: do a find & replace of the regex
`-(\s*)\(void\)(\s*)spec` with `+$1(void)$2spec`).

For migrating from Quick 6 to Quick 7, it would be easiest to also do a
Find & Replace of `: QuickSpec` to `: AsyncSpec`, then migrate tests
that do not need to run in async contexts to be `QuickSpec`s themselves.

### Auto-Generated Changelog

#### What's Changed

- Bump git from 1.12.0 to 1.13.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Quick/Quick/pull/1191](https://togithub.com/Quick/Quick/pull/1191)
- (Temporarily) Remove async support from Quick by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1192](https://togithub.com/Quick/Quick/pull/1192)
- Bump activesupport from 6.1.5 to 6.1.7.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Quick/Quick/pull/1196](https://togithub.com/Quick/Quick/pull/1196)
- Bump danger from 9.1.0 to 9.2.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Quick/Quick/pull/1198](https://togithub.com/Quick/Quick/pull/1198)
- Transition QuickSpec.spec to be a static method. by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1200](https://togithub.com/Quick/Quick/pull/1200)
- Add async duplicate-world based support. by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1199](https://togithub.com/Quick/Quick/pull/1199)
- Bump cocoapods from 1.11.3 to 1.12.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Quick/Quick/pull/1201](https://togithub.com/Quick/Quick/pull/1201)
- Bump activesupport from 7.0.4.2 to 7.0.4.3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Quick/Quick/pull/1203](https://togithub.com/Quick/Quick/pull/1203)
- Bump fkirc/skip-duplicate-actions from 5.2.0 to 5.3.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Quick/Quick/pull/1188](https://togithub.com/Quick/Quick/pull/1188)
- \[Translation] AsyncAwait.md Korean translation by
[@&#8203;tisohjung](https://togithub.com/tisohjung) in
[https://github.com/Quick/Quick/pull/1204](https://togithub.com/Quick/Quick/pull/1204)
- Update Nimble to v12 by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1206](https://togithub.com/Quick/Quick/pull/1206)
- Demangle QuickSpec test names as much as possible by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1207](https://togithub.com/Quick/Quick/pull/1207)
- Add mechanism to fallback to legacy test selector names by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1211](https://togithub.com/Quick/Quick/pull/1211)
- Bump cocoapods from 1.12.0 to 1.12.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Quick/Quick/pull/1210](https://togithub.com/Quick/Quick/pull/1210)
- Bump danger from 9.2.0 to 9.3.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Quick/Quick/pull/1209](https://togithub.com/Quick/Quick/pull/1209)
- Don't imply that we plan to remove the option to force encoded test
selector names by [@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1212](https://togithub.com/Quick/Quick/pull/1212)
- Merge branch quick\_7 into main. by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1213](https://togithub.com/Quick/Quick/pull/1213)
- \[doc] Corrected to class method by
[@&#8203;coffmark](https://togithub.com/coffmark) in
[https://github.com/Quick/Quick/pull/1214](https://togithub.com/Quick/Quick/pull/1214)
- Update the english documentation for Quick 7 by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1215](https://togithub.com/Quick/Quick/pull/1215)
- Provide a way to get the currently running spec, regardless of if
we're executing an AsyncSpec or a QuickSpec by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1216](https://togithub.com/Quick/Quick/pull/1216)

#### New Contributors

- [@&#8203;tisohjung](https://togithub.com/tisohjung) made their first
contribution in
[https://github.com/Quick/Quick/pull/1204](https://togithub.com/Quick/Quick/pull/1204)
- [@&#8203;coffmark](https://togithub.com/coffmark) made their first
contribution in
[https://github.com/Quick/Quick/pull/1214](https://togithub.com/Quick/Quick/pull/1214)

**Full Changelog**:
Quick/Quick@v6.1.0...v7.0.0

### [`v6.1.0`](https://togithub.com/Quick/Quick/releases/tag/v6.1.0)

[Compare
Source](https://togithub.com/Quick/Quick/compare/v6.0.1...v6.1.0)

### Highlighted Changes

- New `TestState` property wrapper (Thanks
[@&#8203;CraigSiemens](https://togithub.com/CraigSiemens)!). You can now
wrap properties with `@TestState` to have them automatically set to nil.
- Objective-C API is no longer available in Swift, this should reduce
confusion whether a test is being executed in an async context or not.
-   This release drops support for Swift 5.6/Xcode 13.3.1.

### Auto-generated Release Notes

#### What's Changed

- Bump danger from 9.0.0 to 9.1.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Quick/Quick/pull/1184](https://togithub.com/Quick/Quick/pull/1184)
- Make Objective-C API unavailable in Swift. by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1185](https://togithub.com/Quick/Quick/pull/1185)
- Update Nimble to 11.2.1, remove now-unnecessary usage of awaits in
tests. Drop support for swift 5.6/Xcode 13.3.1 by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1187](https://togithub.com/Quick/Quick/pull/1187)
- Added a `TestState` property wrapper. by
[@&#8203;CraigSiemens](https://togithub.com/CraigSiemens) in
[https://github.com/Quick/Quick/pull/1186](https://togithub.com/Quick/Quick/pull/1186)

#### New Contributors

- [@&#8203;CraigSiemens](https://togithub.com/CraigSiemens) made their
first contribution in
[https://github.com/Quick/Quick/pull/1186](https://togithub.com/Quick/Quick/pull/1186)

**Full Changelog**:
Quick/Quick@v6.0.1...v6.1.0

### [`v6.0.1`](https://togithub.com/Quick/Quick/releases/tag/v6.0.1)

[Compare
Source](https://togithub.com/Quick/Quick/compare/v6.0.0...v6.0.1)

#### What's Changed

- Force async in `fit`, `xit`, `pending` and `justBeforeEach` by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1183](https://togithub.com/Quick/Quick/pull/1183)

**Full Changelog**:
Quick/Quick@v6.0.0...v6.0.1

### [`v6.0.0`](https://togithub.com/Quick/Quick/releases/tag/v6.0.0)

[Compare
Source](https://togithub.com/Quick/Quick/compare/v5.0.1...v6.0.0)

This closes the [v6.0.0
milestone](https://togithub.com/Quick/Quick/milestone/8).

### Highlights

See additional details under the auto-generated release notes below.

#### Fixed

- No more sporadic crashes attempting to detect subclasses
[https://github.com/Quick/Quick/pull/1156](https://togithub.com/Quick/Quick/pull/1156)
- Rerunning an individual test
[https://github.com/Quick/Quick/pull/1166](https://togithub.com/Quick/Quick/pull/1166)
- Skipped tests are reported to Xcode
[https://github.com/Quick/Quick/pull/1098](https://togithub.com/Quick/Quick/pull/1098)

#### New

- Async/await support. All tests now run in an async context.
[https://github.com/Quick/Quick/pull/1160](https://togithub.com/Quick/Quick/pull/1160)
- You can now throw a `StopTest` error to end a test prematurely without
it being reported as an error.
[https://github.com/Quick/Quick/pull/1165](https://togithub.com/Quick/Quick/pull/1165)
- Added the `justBeforeEach` operator, which takes a closure and runs it
immediately prior to the relevant `it` tests.
[https://github.com/Quick/Quick/pull/1169](https://togithub.com/Quick/Quick/pull/1169)
For example

```swift
var ordering: [Int] = []
beforeEach {
    ordering.append(1)
}

justBeforeEach {
    ordering.append(3)
}

beforeEach {
    ordering.append(2)
}

it("runs justBeforeEach after the other beforeEach's") {
    expect(ordering).to(equal([1, 2, 3]))
}
```

#### Breaking

- This version raises minimum required version to Swift 5.6, and
required OS to macOS 10.15, iOS 13, and tvOS 13.
- `aroundEach` is removed from the Objective-C API
[https://github.com/Quick/Quick/pull/1160](https://togithub.com/Quick/Quick/pull/1160)
- Again, with the async support, all tests now run in an async context.
This will require you to make changes, especially if you use Nimble.

### Auto-Generated Release Notes

#### What's Changed

- Create funding.yml by
[@&#8203;jessesquires](https://togithub.com/jessesquires) in
[https://github.com/Quick/Quick/pull/1147](https://togithub.com/Quick/Quick/pull/1147)
- Report skipped tests to Xcode by
[@&#8203;amomchilov](https://togithub.com/amomchilov) in
[https://github.com/Quick/Quick/pull/1098](https://togithub.com/Quick/Quick/pull/1098)
- Bump danger from 8.6.0 to 8.6.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Quick/Quick/pull/1148](https://togithub.com/Quick/Quick/pull/1148)
- Renamed Configuration -> QCKConfiguration on documentation by
[@&#8203;takehilo](https://togithub.com/takehilo) in
[https://github.com/Quick/Quick/pull/1152](https://togithub.com/Quick/Quick/pull/1152)
- Fix sporadic crashes caused by finding classes that don't play well
with isSubclass(of:) by [@&#8203;younata](https://togithub.com/younata)
in
[https://github.com/Quick/Quick/pull/1156](https://togithub.com/Quick/Quick/pull/1156)
- Raise minimum supported versions to macOS 10.15, iOS 13, tvOS 13 by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1146](https://togithub.com/Quick/Quick/pull/1146)
- version up Nimble in Package.swift by
[@&#8203;kimxwan0319](https://togithub.com/kimxwan0319) in
[https://github.com/Quick/Quick/pull/1153](https://togithub.com/Quick/Quick/pull/1153)
- Update Nimble submodule checkout to refer to the Nimble v10.0.0 commit
by [@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1157](https://togithub.com/Quick/Quick/pull/1157)
- Fix tests broken by Nimble 10 update by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1158](https://togithub.com/Quick/Quick/pull/1158)
- Add [@&#8203;younata](https://togithub.com/younata) to funding.yml by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1164](https://togithub.com/Quick/Quick/pull/1164)
- Bump danger from 8.6.1 to 9.0.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Quick/Quick/pull/1168](https://togithub.com/Quick/Quick/pull/1168)
- Allow throwing in a test without producing an unexpected error by
[@&#8203;bnickel](https://togithub.com/bnickel) in
[https://github.com/Quick/Quick/pull/1165](https://togithub.com/Quick/Quick/pull/1165)
- Allow rerunning individual examples in Xcode by
[@&#8203;bnickel](https://togithub.com/bnickel) in
[https://github.com/Quick/Quick/pull/1166](https://togithub.com/Quick/Quick/pull/1166)
- Bump fkirc/skip-duplicate-actions from 4.0.0 to 5.1.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Quick/Quick/pull/1171](https://togithub.com/Quick/Quick/pull/1171)
- Introduce an `assignBefore` operator by
[@&#8203;esilverberg](https://togithub.com/esilverberg) in
[https://github.com/Quick/Quick/pull/1169](https://togithub.com/Quick/Quick/pull/1169)
- Bump fkirc/skip-duplicate-actions from 5.1.0 to 5.2.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Quick/Quick/pull/1172](https://togithub.com/Quick/Quick/pull/1172)
- Add support for xcode 14 and swift 5.7 by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1174](https://togithub.com/Quick/Quick/pull/1174)
- Swift Async/Await Support by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1160](https://togithub.com/Quick/Quick/pull/1160)
- Update Nimble to V11 by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Quick/pull/1175](https://togithub.com/Quick/Quick/pull/1175)

#### New Contributors

- [@&#8203;amomchilov](https://togithub.com/amomchilov) made their first
contribution in
[https://github.com/Quick/Quick/pull/1098](https://togithub.com/Quick/Quick/pull/1098)
- [@&#8203;takehilo](https://togithub.com/takehilo) made their first
contribution in
[https://github.com/Quick/Quick/pull/1152](https://togithub.com/Quick/Quick/pull/1152)
- [@&#8203;kimxwan0319](https://togithub.com/kimxwan0319) made their
first contribution in
[https://github.com/Quick/Quick/pull/1153](https://togithub.com/Quick/Quick/pull/1153)
- [@&#8203;bnickel](https://togithub.com/bnickel) made their first
contribution in
[https://github.com/Quick/Quick/pull/1165](https://togithub.com/Quick/Quick/pull/1165)
- [@&#8203;esilverberg](https://togithub.com/esilverberg) made their
first contribution in
[https://github.com/Quick/Quick/pull/1169](https://togithub.com/Quick/Quick/pull/1169)

**Full Changelog**:
Quick/Quick@v5.0.1...v6.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/cgrindel/rules_swift_package_manager).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNTkuNyIsInVwZGF0ZWRJblZlciI6IjM1LjE1OS43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Mark skipped tests as skipped in Xcode.
4 participants