-
Notifications
You must be signed in to change notification settings - Fork 121
AINFRA-780 - Make NetworkingTests a Swift package test target #15796
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
Conversation
Generated by 🚫 Danger |
|
|
jaclync
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes! I removed the derived data and tried running the remote tests locally, some behaviors I'd like to clarify:
- There's still a Networking project in the project navigator, but clicking on shows an error (first screenshot). Also seeing an error (the second screenshot) that doesn't block running the tests but I think it's worth removing to reduce confusion:
| error clicking on Networking project | similar error |
|---|---|
![]() |
![]() |
- In order to run Networking tests, is it an expected change to have to switch to the Networking scheme instead of staying in the WooCommerce scheme?
- I haven't been able to see the diamond check boxes next to each test class/function in the code to run them, do they show up on your end? Just wondering if it is an unexpected change, if so it might be worth notifying developers to prevent from unncessary time trying to get them working. I tried reopening Xcode which usually resolves it, but still cannot see them appear.
| branch | trunk |
|---|---|
![]() |
![]() |
| "WordPressShared", | ||
| .product(name: "KeychainAccess", package: "KeychainAccess"), | ||
| ], | ||
| resources: [.process("Responses")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The Yosemite and WooCommerce test targets now reference the
NetworkingTests/Responses/folder from the location in theModules/Tests/folder. At some point, we ought to isolate the responses in some kind of tests helper package, but for the moment including them this way (which to me is like a soft-duplication) is convenient.
I agree that a separate package for these mock responses would be ideal.
915a045 to
550c2eb
Compare
|
Thanks for the review @jaclync 🙇♂️
Ouch! I should have double checked and removed it from the workspace. I rebased on
No. That's just Xcode being annoying with the test plan and rebase. See for example https://github.com/woocommerce/woocommerce-ios/pull/15794/files#r2160527954. This should be addressed now as well.
Funny that you mention that. It's a long standing Xcode bug which should be fixed in Xcode 26: |
|
Thanks for the updates! 1 is fixed now, and 3 doesn't sound like a blocking issue and should be fixed later.
After rebasing the PR and relaunching Xcode a few times, I still wasn't able to run the NetworkingTests with the WooCommerce scheme.
More importantly, I didn't seem to find the NetworkingTests (and StorageTests which is also missing from the screenshot above) mentions in the unit tests CI logs. Not sure if I missed the tests in the CI logs? |
550c2eb to
93ec55a
Compare
|
@jaclync Mmmm.... What's going on? The two targets weren't there on my branch after rebasing on Anyway, I committed the Test Plan update in isolation in 93ec55a. Let's see how it goes in CI this time. |
|
👀 Just sneaking in this PR to share that CI failed with the crash I originally saw when making StorageTests a package, so we might have some flakiness here: I haven't re-run the failing build in case you want to take a further look 👍 |
|
@jaclync @iamgabrielma thanks folks. Everything should be fixed now. I clearly lost something along the way with the rebases 😓 |
jaclync
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates @mokagio! I see the NetworkingTests in the latest CI log, can run NetworkingTests without switching scheme as the NetworkingTests is included in the test plan now. ![]()









Description
Now that all the frameworks sources are Swift packages (targets in the same Swift package to be precise) we can move the tests there, too. We didn't do that all in one go to avoid big diffs.
Notice:
Networking/folder has been removed, including the dedicated Xcode projectNetworkingTests/Responses/folder from the location in theModules/Tests/folder. At some point, we ought to isolate the responses in some kind of tests helper package, but for the moment including them this way (which to me is like a soft-duplication) is convenient.Testing information
See green CI.
Additionally, you can run the focused Hardware tests by selecting the Hardware scheme from Xcode.
Screenshots
RELEASE-NOTES.txtif necessary. — N.A.