Pinned
Jon Reid
Jon Reid
@qualitycoding.org
https://qualitycoding.org Author of iOS Unit Testing by Example https://iosunittestingbyexample.com. Technical coach, ex-Industrial Logic. Over 20 years of #TDD. Code with joy, drive down your cost of change. he/him
892 followers198 following619 posts
Star Trek fans mourn the passing of Lieutenant Chekov. But I remember Walter Koenig most as Bester, the snarkiest of bad guys on Babylon 5. youtu.be/s72fJb7a-s8?...
How to Write SwiftUI Tests That Survive Redesigns https://qualitycoding.org/find-swiftui-views-unit-tests/
Now, after all these years… I get to work _on_ Smalltalk! If you check out the new company website, you may be surprised to see Python instead. Cool stuff is on the way. www.gemdb.com
Starting your first SwiftUI test with TDD? Assert First gets fiddly when ViewInspector is involved. So outline the test as plain-English comments first, and you'll know where you're going before writing code. https://qualitycoding.org/describe-test-plain-english/
Would you write more SwiftUI tests if they didn't break every time the UI changed? https://qualitycoding.org/find-swiftui-views-unit-tests/
Type one word, tab through four placeholders, and you've got a robust view finder for your SwiftUI unit tests. Here's my findview snippet in action: https://qualitycoding.org/find-swiftui-views-unit-tests/
Most iOS developers never unit test their SwiftUI views. The usual excuse is "they'd be too brittle." That excuse has a fix. https://qualitycoding.org/find-swiftui-views-unit-tests/
From Fragile to Robust: Finding Views in SwiftUI Unit Tests https://qualitycoding.org/find-swiftui-views-unit-tests/
Find SwiftUI Views in Unit Tests, the Robust Way https://qualitycoding.org/find-swiftui-views-unit-tests/
Jon Reid reposted
Bringing back a classic post. Kent Beck's Decompose Run-On Tests. Updated for Swift Testing jaimzuber.com/testing/deco... Kent's original Facebook Note is the post I've shared the most when teaching devs to write maintainable test suites
Jon Reid reposted
How can you learn and practice Swift TDD, refactoring, or working with legacy code? With these Swift "code kata" exercises. Enter the dojo… https://qualitycoding.org/swift-code-kata/
Jon Reid reposted
“It takes experiencing the fixed system to know that there was a problem that needed fixing.”
I just had my piano tuned today, and suddenly, there's a sparkle to the sound that wasn't there before. The interesting thing is that yesterday, I was wondering if it needed tuning at all. Everything sounded okay, there were no obvious off notes. 1/5
Jon Reid reposted
This is outstanding both as a piece of parody and as a more digestible explanation of what happened with the Hugging Face hack. https://www.frogandtoad.ai/
A dedicated domain for my book. I should have made this sooner. https://iosunittestingbyexample.com/
I need to add a section answering the most common question: "This book focuses on XCTest + UIKit. Is it still relevant for Swift Testing and SwiftUI?" Short answer: - Swift Testing has some differences, but testing is still testing. - For SwiftUI testing see qualitycoding.org/tdd-swiftui-...
What if there were a way to get feedback on your code every time you compiled? Find problems in code more quickly by taking your Xcode warnings to the max. https://qualitycoding.org/xcode-warnings/
In my talk at try! Swift Tokyo, I explained how to make Swift mock objects. Unless we're careful, they can lead to fragile tests. Let's make them flexible. https://qualitycoding.org/try-swift-mock-objects/
Jon Reid reposted
How can you increase confidence in your test code? Who tests the tests? Here are the techniques I depend on to enable bold refactoring of tests. https://qualitycoding.org/who-tests-the-tests/
When refactoring in small steps, sometimes you have to make a mess in order to clean a mess. Download the code and walk through these refactoring steps. https://qualitycoding.org/refactoring-cleaning-mess/
Jon Reid reposted
Jon Reid reposted
A faithful new rendition of the music of my youth, back when 20-minute pieces were the thing. www.youtube.com/watch?v=TUo5...
"My Big 5 takeaways from iOS Unit Testing by Example" book review by Dan Smith https://medium.com/kinandcartacreated/my-big-5-takeaways-from-ios-unit-testing-by-example-fea06fdad2a0
When you're starting TDD, the hardest part is knowing where to begin. What should the first test be? What even counts as a "first step"? https://qualitycoding.org/tdd-where-do-you-even-begin/
Jon Reid reposted
Speed up your Swift development with custom Xcode key bindings for automated refactoring. Learn which shortcuts I use, why they matter, and how to stay in flow. https://qualitycoding.org/xcode-key-bindings-refactoring/
Jon Reid reposted
In TDD we're creating the test code and the production code in parallel. The 3 Laws of TDD come to our rescue, freeing us to focus on one thing at a time. https://qualitycoding.org/3-laws-tdd/
After all these years… the climax of the Utopia Theme still sends electricity through my body. www.youtube.com/watch?v=QYWR...
How can we bypass the normal SwiftUI app launch sequence during testing? We've done this for app delegates, so let's also do it for SwiftUI apps. https://qualitycoding.org/bypass-swiftui-app-launch-unit-testing/
Jon Reid reposted
LLM coding assistants can free up brain cycles to concentrate on your customer's problems instead of the minutiae of code. But how do we get the best out of them? @iamleeg.bsky.social discusses "Patterns of AI-augmented software engineering" at iOSDevUK in Sept www.iosdevuk.com