Skip to content

[Swift in WebKit] Work towards integrating Swift Testing into WebKit#60626

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
rr-codes:eng/Swift-in-WebKit-Work-towards-integrating-Swift-Testing-into-WebKit
Mar 16, 2026
Merged

[Swift in WebKit] Work towards integrating Swift Testing into WebKit#60626
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
rr-codes:eng/Swift-in-WebKit-Work-towards-integrating-Swift-Testing-into-WebKit

Conversation

@rr-codes
Copy link
Contributor

@rr-codes rr-codes commented Mar 14, 2026

53d30e1

[Swift in WebKit] Work towards integrating Swift Testing into WebKit
https://bugs.webkit.org/show_bug.cgi?id=309952
rdar://172543926

Reviewed by Abrar Rahman Protyasha.

This is step two of three for fully integrating Swift Testing into WebKit. Now, to run these native tests
locally, all you have to do is press Command+U in Xcode!

* Tools/TestWebKitAPI/Configurations/TestWebKitAPIBundle.xcconfig:
* Tools/TestWebKitAPI/TestBundle/GoogleTests.mm: Removed.

Remove this currently unused, experimental way of running GTests as XCTests, since this is not a goal
at present and gets in the way of being able to run the test plan completely.

* Tools/TestWebKitAPI/TestBundle/TestWebKitAPI.xctestplan:

- Disable code coverage. This is a fairly useless metric for these limited tests, and also substantially
increases how long the tests take to run.
- Disable parallelization, since WebKit is always used on the main thread

* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

Let Xcode sort some files.

* Tools/TestWebKitAPI/Tests/WebKit Swift/WebPageNavigationTests.swift:
* WebKit.xcworkspace/xcshareddata/xcschemes/Everything up to WebKit + Tools.xcscheme:

Use the test plan for the Test action of the "Everything up to WebKit + Tools" scheme.

* Tools/TestWebKitAPI/Tests/WebKit Swift/WebPageNavigationTests.swift:

Disable a slow test.

Canonical link: https://commits.webkit.org/309343@main

cc5731d

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe 🛠 win ❌ 🛠 ios-apple
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug 🧪 wpe-wk2 🧪 win-tests ✅ 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 🧪 api-mac ✅ 🧪 api-wpe ⏳ 🛠 vision-apple
🧪 ios-wk2-wpt 🧪 api-mac-debug ✅ 🛠 gtk3-libwebrtc
🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🧪 mac-wk2 🧪 gtk-wk2
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
🛠 🧪 merge ✅ 🛠 vision-sim 🧪 mac-wk2-stress ✅ 🛠 playstation
✅ 🛠 🧪 unsafe-merge ✅ 🧪 vision-wk2 🧪 mac-intel-wk2
✅ 🛠 tv
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@rr-codes rr-codes requested a review from emw-apple as a code owner March 14, 2026 08:40
@rr-codes rr-codes self-assigned this Mar 14, 2026
@rr-codes rr-codes added the WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore). label Mar 14, 2026
@rr-codes rr-codes force-pushed the eng/Swift-in-WebKit-Work-towards-integrating-Swift-Testing-into-WebKit branch from d3d8527 to 82a52d5 Compare March 14, 2026 08:48
@rr-codes rr-codes force-pushed the eng/Swift-in-WebKit-Work-towards-integrating-Swift-Testing-into-WebKit branch from 82a52d5 to 25dc86a Compare March 15, 2026 06:44
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Mar 15, 2026
Copy link
Member

@aprotyas aprotyas left a comment

Choose a reason for hiding this comment

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

LGTM, I wouldn't disable the test unless it's timing out?

@@ -155,7 +155,7 @@ struct WebPageNavigationTests {
}
}

@Test
@Test(.disabled("This test is too slow"))
Copy link
Member

Choose a reason for hiding this comment

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

too slow that it times out? We do have other API tests that take multiple seconds

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It has a hard-coded delay of 10 seconds, which is unacceptable for CI (and there’s no way to not have a hard coded delay because observing the sequence itself modifies the result lol)

@rr-codes rr-codes removed the merging-blocked Applied to prevent a change from being merged label Mar 16, 2026
@rr-codes rr-codes force-pushed the eng/Swift-in-WebKit-Work-towards-integrating-Swift-Testing-into-WebKit branch from 25dc86a to cc5731d Compare March 16, 2026 19:09
@rr-codes rr-codes added merge-queue Applied to send a pull request to merge-queue unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing and removed merge-queue Applied to send a pull request to merge-queue labels Mar 16, 2026
https://bugs.webkit.org/show_bug.cgi?id=309952
rdar://172543926

Reviewed by Abrar Rahman Protyasha.

This is step two of three for fully integrating Swift Testing into WebKit. Now, to run these native tests
locally, all you have to do is press Command+U in Xcode!

* Tools/TestWebKitAPI/Configurations/TestWebKitAPIBundle.xcconfig:
* Tools/TestWebKitAPI/TestBundle/GoogleTests.mm: Removed.

Remove this currently unused, experimental way of running GTests as XCTests, since this is not a goal
at present and gets in the way of being able to run the test plan completely.

* Tools/TestWebKitAPI/TestBundle/TestWebKitAPI.xctestplan:

- Disable code coverage. This is a fairly useless metric for these limited tests, and also substantially
increases how long the tests take to run.
- Disable parallelization, since WebKit is always used on the main thread

* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

Let Xcode sort some files.

* Tools/TestWebKitAPI/Tests/WebKit Swift/WebPageNavigationTests.swift:
* WebKit.xcworkspace/xcshareddata/xcschemes/Everything up to WebKit + Tools.xcscheme:

Use the test plan for the Test action of the "Everything up to WebKit + Tools" scheme.

* Tools/TestWebKitAPI/Tests/WebKit Swift/WebPageNavigationTests.swift:

Disable a slow test.

Canonical link: https://commits.webkit.org/309343@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Swift-in-WebKit-Work-towards-integrating-Swift-Testing-into-WebKit branch from cc5731d to 53d30e1 Compare March 16, 2026 19:57
@webkit-commit-queue
Copy link
Collaborator

Committed 309343@main (53d30e1): https://commits.webkit.org/309343@main

Reviewed commits have been landed. Closing PR #60626 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 53d30e1 into WebKit:main Mar 16, 2026
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants