At the top, the title "TDD with SwiftUI - Triggering API Request" and at the bottom, an image of a phone with a red button and a finger pressing that button.

TDD with SwiftUI - Triggering API request

Recap Hello everyone and welcome to the next chapter of the series about SwiftUI code automated testing! In the previous post we defined acceptance criteria for the Joke app that we’re implementing we covered by snapshot tests all UI cases mentioned in the acceptance critieria That’s what the app looks like ⤵️ Here’s the link to the previous blog post ⤵️ (Worth reading before this one) Testing SwiftUI Code - The beginning (UI)...

September 13, 2024 · 9 min · Maciej Gomolka
Post title on the left, a diagram symbolizing the red-green-refactor approach

Testing SwiftUI Code - The beginning (UI)

Intro Hello everyone and welcome to my first (ever) blog series! Today, I’m going to begin experimenting with SwiftUI. The mission is to build a small application and having it fully tested 💯. I decided to go for that quest to broaden my knowledge around SwiftUI and verify the rumors that it cannot be tested. To keep it relatively readable I decided to split it up and we’re going to see how many parts we end up with....

June 6, 2024 · 10 min · Maciej Gomolka
scientist at desk created with emojis

Testing SwiftData and the Query property wrapper through an example

We’re just after this year’s WWDC where we had a chance to witness the unveiling of a new persistence framework called SwiftData. Naturally, I couldn’t resist delving deeper into it. One particular topic that caught my attention was the observation of local storage using Query and its testability. SwiftData SwiftData makes it easy to persist data using declarative code. You can query and filter data using regular Swift code. And it’s designed to integrate seamlessly with SwiftUI....

June 25, 2023 · 8 min · Maciej Gomolka