My solution uses a combination of macOS accessibility APIs and CGEvents directly (not keyDown), the former of which understands the whereabouts of the simulator, the latter for how to find the center of the viewport, set up a two-finger gesture by spawning at the center, option-dragging to a specified input distance, option-shift-dragging to a specified coordinate, then performing one or more gestures therein.

There has to be a better way!?

#RandomForms #swiftui #SwiftTesting #macos

#iosdev #buildInPublic #coredata #swiftTesting

Random thoughts for future development:
Object identity is not straightforward.

If I change a collection name on device A, the change should propagate to device B.
Should two collections with the same name on different devices but with different members be merged? I think the principle of least surprise would argue that they should.

OTOH, two tunes with the same name but different melodies should be distinct (common in #irishmusic)

29/n

#iosdev #buildInPublic #coredata #swiftTesting

Not much time to do stuff over the last little while - refactored the unit tests to parameterize them and added some helper functions, added a runtime flag to choose a real file for the SQLite backing store vs. /dev/null
Changes are in GitHub if anybody is interested https://github.com/Wil-Macaulay/attributedRelationships

28/n

GitHub - Wil-Macaulay/attributedRelationships: Demo code for Core Data/Cloudkit

Demo code for Core Data/Cloudkit . Contribute to Wil-Macaulay/attributedRelationships development by creating an account on GitHub.

GitHub

#iosdev #buildInPublic #coredata #swiftTesting

Will be exploring Apple’s cktool for #cloudkit setup, which hopefully will let me populate data that will let me test sync

https://developer.apple.com/icloud/ck-tool/

27/n

cktool - iCloud - Apple Developer

Find details on using cktool.

Apple Developer

#iosdev #buildInPublic #coredata #uikit #swiftTesting

This is going to be super important when I change the underlying data model. Maybe I should add a little facade over the CoreData so I can preserve the API and leave the unit tests unchanged? That’s the ideal when refactoring, run the exact same suite of tests and have them succeed.

Still not sure on my approach for testing when synchronization across multiple devices…

26/n

#iosdev #buildInPublic #coredata #uikit #swiftTesting

Added my first set of unit tests - just creating a single instance of each of my core entities - pushed to GitHub for those that care! Next step is to add tests for the relationships: for example, adding a Tune to a TuneSet and then reordering them.
Found a neat trick on testing Core Data without leaving droppings - use /dev/null as the store. See
https://medium.com/tiendeo-tech/ios-how-to-unit-test-core-data-eb4a754f2603

25/n

iOS: How to unit test Core Data?

Testing Core Data integration in your app is very useful and a lot easier than you think! In this post we show you how we create a test…

Medium

Scaling up your test suite? These five pitfalls trip up teams adopting Swift Testing. Learn how to avoid test pollution, flaky assertions, and maintenance debt as your test coverage grows.

🔗 https://swiftology.io/articles/pitfalls-of-parameterized-tests by Alex Ozun (@alexozun)

#SwiftTesting #Testing #iOSDev

Pitfalls of Parameterized Tests | Swiftology

In this article, I share my experience adopting Swift Testing at scale and the lessons I learned about **Parameterized Tests**, including five common pitfalls teams may encounter. I also recommend best practices for avoiding them.

Swiftology

After Swift Testing added support for image attachments on apple platforms and windows platforms (insert 90s-era M$ insult here), they had realized they really should consolidate the different AttachableAs${PLATFORM_SPECIFIC_IMAGE_TYPE} protocols down into just a single AttachableAsImage protocol that each platform needs to conform to.

This is just large enough of a change to require evolution review, which I volunteered to manage! If you have thoughts, please add them to https://forums.swift.org/t/st-0017-consolidate-swift-testing-s-image-attachments-api-across-platforms/82815 (or message me on the swift forums).

The review period started some 30 minutes ago and runs through the end of October 30th!

#SwiftLang #Testing #SwiftTesting

ST-0017: Consolidate Swift Testing’s image attachments API across platforms

Hello Swift Community! The review of ST-0017 “Consolidate Swift Testing's image attachments API across platforms” begins now and runs through Thursday October 30, 2025. The proposal is available here: swift-evolution/proposals/testing/0017-image-attachment-consolidation.md at main · swiftlang/swift-evolution · GitHub Reviews are an important part of the Swift evolution process. All review feedback should be either on this forum thread or, if you would like to keep your feedback private, dir...

Swift Forums

🧪 Just made my Swift Testing coverage setup reusable!

Put it in a GitHub Action (v0.1.1) so I can use it across projects and get coverage comments on PRs.

Handles Swift Testing framework compatibility, automatic coverage reporting.

https://github.com/oleksiikolomiietssnapp/swift-coverage-action

#Swift #GitHubActions #SwiftTesting #OpenSource

The #SwiftTesting team at Apple is hiring! If you're passionate about testing libraries and tools, enjoy open source development on multiple platforms, and want to help Swift developers everywhere improve software quality, let's talk!

https://jobs.apple.com/en-us/details/200618576-0240/swift-testing-frameworks-engineer

Swift Testing Frameworks Engineer - Jobs - Careers at Apple

Apply for a Swift Testing Frameworks Engineer job at Apple. Read about the role and find out if it’s right for you.