XCTest tips and tricks that can level up your Swift testing
Feb 4, 2021, 3:00 AM
XCTest has a lot of tricks up its sleeve. But some of the really good stuff is buried behind macros or lacking adequate documentation. Here’s some of my favorite XCTest tips and tricks that I’ve picked up over the past few years testing...
Improving XCTest test name readability
Jan 28, 2021, 3:00 AM
Naming things is hard. And naming tests is no exception. But XCTest adds another layer of complexity: test names have to be functions.
Clean up your Swift test suite with XCTUnwrap
Jan 21, 2021, 3:00 AM
XCTUnwrap is a public XCTest helper that often gets overlooked. It was added in Xcode 11 and slipped under my radar until recently.
How to set WKWebView’s title under test
Jan 7, 2021, 3:00 AM
I ran into an interesting problem working with the Turbo framework the other day. I was writing a test that depended on WKWebView’s title but couldn’t figure out how to set it.
Dynamically verified Swift mocks
Dec 31, 2020, 3:00 AM
December has been a month of discovery for me. I’ve been exploring alternative approaches to different testing techniques in Swift.
Swift mocks without protocols
Dec 24, 2020, 3:00 AM
A true unit test mocks out the subject’s collaborators. If you’re testing the service layer you don’t want the HTTP client making real network requests in your test suite.
Roll your own dependency injection in Swift
Dec 17, 2020, 3:00 AM
Dependency injection, or DI, is a key piece of the Swift testing puzzle. It gives you necessary control over how your subject under test interacts with its collaborators.
Testing the UI without UI Testing in Swift
Dec 3, 2020, 3:00 AM
Over the years of testing applications I’ve started to put more and more value in end-to-end integration tests. They help me identify new categories of bugs that are harder to catch when only doing unit tests.
Redirect www traffic to a naked domain in Rails
Nov 26, 2020, 3:00 AM
Naked domains, or root domains, are hosts without the leading www. This blog is a perfect example, masilotti.com. They are more succinct, direct, and easier to read.
Regexes with multiple slashes in Ruby
Nov 19, 2020, 3:00 AM
I picked up a new tip yesterday while working with regexes in Ruby.
My Product Hunt launch: what worked and what didn’t
Oct 27, 2020, 3:00 AM
Yesterday I launched Mugshot Bot on Product Hunt as a solo founder. It was a wild ride and I’ve never been glued to my computer like this.
Idea to paying customer in one month
Oct 22, 2020, 3:00 AM
Update: Mugshot Bot is live on Product Hunt today.
Tailwind CSS everywhere and a new Masilotti.com product
Sep 8, 2020, 3:00 AM
It’s been a busy month! I’ve gone all in on Tailwind CSS, launched a new product, and started building a newsletter. Here’s what’s been keeping me busy.
How to test deep links with UI Testing
Aug 12, 2020, 3:00 AM
Deep linking, and even universal links, are an important part of the app ecosystem. They seamlessly link content inside your app to the external world. Often these flows have complex behaviors with lots of branching logic. All the more...
How to manage multiple sheets in SwiftUI
Aug 2, 2020, 12:00 AM
My first SwiftUI post! I recently converted my iOS app X-Wing AI to SwiftUI and ran into some issues with multiple sheets. Here’s my step-by-step journey on how I refactored the code to handle any number of sheets with ObservableObject and...
Zero to Tailwind CSS over the weekend
Jul 24, 2020, 12:00 AM
This past weekend, I built a landing page and redesigned this blog with Tailwind CSS. Getting going was tough. But I don’t think I’ll ever go back.
How to play board games online with your friends
Apr 23, 2020, 12:00 AM
If you’re anything like me, you’ve been craving a good (in-person) board game night with your friends. To scratch my itch, I’ve moved all my board game sessions online. I’ve been playing with a few different groups through a variety of...
Better unit testing with Swift
Mar 31, 2020, 12:00 AM
This article was updated on March 31, 2020. It includes feedback from a live session I hosted on testing in Swift. Email me if you want to join the next session!
Great two-player board games
Mar 15, 2020, 12:00 AM
I’ve worked remotely for the past four years. First, at BeerMenus, a remote-only company. And now, doing Ruby on Rails and iOS contract work for a variety of companies. Three years ago my wife, Adrienne, and I decided to leave NYC and...
I just deleted 2500 records from production 😬
Mar 18, 2019, 12:00 AM
I woke up yesterday eager to add pretty social shares to my side project, weTabletop. As I plugged a few URLs into the Twitter Card Validator a few started to 404. Oddly, the records seemed to be fine in my development database running a...
How to Test UIAlertController
Aug 7, 2018, 12:00 AM
Introduced in iOS 9, UIAlertController is the quickest way to present alerts and action sheets to users on iOS. Powered by a simple, straightforward API, you can get something on the screen in just a few lines of code. However, overly...
BeerMenus & Turbolinks
Mar 16, 2018, 12:00 AM
As my time in Croatia wraps up I was given the opportunity to speak at a local meetup in Split, Mobile Monday Split. My presentation covered two topics: BeerMenus and Turbolinks. I dove into the Consumer and Retailer side of the BeerMenus...
Where has Joe been?
Aug 22, 2017, 12:00 AM
Last you heard from me I was chatting about Waiting in XCTest. Since I haven’t posted in a while I felt it a good idea to give a quick update on where I’ve been and what I’ve been up to.