Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
qyang-nj committed Oct 8, 2024
1 parent 61abaaf commit bc8daf8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions articles/iOSTesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ UI tests let us test our app like the end user. It can mimic the user behaviors,
A more common scenario is to use `xcodebuild test-without-build` to run `.xctest`. [Here](../testing/xcodebuild/run_test.py) is a script to show how this works.

## Swift Testing
In Xcode 16, Apple introduced a testing framework called [Swift Testing](https://developer.apple.com/documentation/testing/). From the building perspective, Swift Testing is fully compatible with XCTest. We can write both Swift Testing and XCTest cases within the same module, or even in the same file. The build output for Swift Testing remains a .xctest bundle, with a few key differences outlined below.
In Xcode 16, Apple introduced a testing framework called [Swift Testing](https://developer.apple.com/documentation/testing/). From the building perspective, Swift Testing is fully compatible with XCTest. We can write both Swift Testing and XCTest cases within the same module, or even in the same file (see [sample](../testing/xctest/test.swift)). The build product for Swift Testing remains a .xctest bundle, with a few key differences outlined below.

| |Swift Testing | XCTest | Notes |
|-------------|--------------| -------| ------- |
Expand All @@ -70,7 +70,7 @@ In Xcode 16, Apple introduced a testing framework called [Swift Testing](https:/
|Linking |`-lXCTestSwiftSupport`||Without this linker flag, linking can succeed but no tests can be found at runtime.


The approach for running Swift tests remains the same as with XCTest. However, the output format of Swift Testing has changed, which can cause issues with tools that parse the results. For example, [xcbeautify is affected by this](https://github.com/cpisciotta/xcbeautify/issues/313).
The approach for running Swift Testings cases remains the same as with XCTest. However, the output format of Swift Testing has changed, which can cause issues with tools that parse the results. For example, [xcbeautify is affected by this](https://github.com/cpisciotta/xcbeautify/issues/313).

<details>
<summary>Output from XCTest</summary>
Expand Down

0 comments on commit bc8daf8

Please sign in to comment.