Awesome Open Source
Awesome Open Source
Sponsorship

Awesome Unit Testing in Swift

A curated collection of awesome blog articles, books, talks, podcasts, tools/frameworks and examples.


🎀 Talks:

Apple WWDC

Apple WWDC 2019 - Testing in Xcode (Session 413)
Apple WWDC 2018 - Testing Tips & Tricks (Session 417)
Apple WWDC 2017 - Engineering for Testability (Session 414)
Apple WWDC 2017 - What's New in Testing (Session 409)
Apple WWDC 2016 - Advanced Testing and Continuous Integration (Session 409)
Apple WWDC 2015 - UI Testing in Xcode (Session 406)

Realm Academy

Realm Academy. Jon Reid - Making Mock Objects More Useful
Realm Academy. Jorge Ortiz - TDD For Masses
Realm Academy. Jorge Ortiz - Unit Testing in Swift 2
Realm Academy. Michael May - Testing an Untested App
Realm Academy. Kyle Fuller - Testing Without xCode
Realm Academy. Veronica Ray - Real World Mocking Swift
Realm Academy. Giovanni Lodi - Testing Realm Apps
Realm Academy. TJ Usiyan - Property-Based Testing with SwiftCheck
Realm Academy. Jaim Zuber - Stylish Developers Guide to Unit Testing in Swift
Realm Academy. Ayaka Nonaka - Testing in Swift Protocols and ViewModels
Realm Academy. Jeff Hui - Testing in Swift
Realm Academy. Sam Soffes - DVR: Network Testing in Swift
Realm Academy. G. Tregoning & P. Zabelin - Successful Test-Driven Development on iOS

CocoaHeads

CocoaHeads Cincinnati (EN) Doug Sjoquist - Xcode UI Testing. The Good, the Bad, and the Ugly
CocoaHeads Dusseldorf (EN) Dominik Hauser - Test Driven iOS Development With Swift
CocoaHeads Kyiv (EN) John Sundell - Writing Swift Code with Great Testability
CocoaHeads Moscow (RU) Vadim Drobinin - Testing UI in xCode
CocoaHeads Moscow (RU) Igor Vasilenko - TDD Patterns and why Do We Need To Know About Them

Rambler & Co

Rambler & Co (RU) Rambler.iOS #5. Stas Tsyganov - VIPER & TDD
Rambler & Co (RU) Rambler.iOS #8. Egor Tolstoy - Clean Unit Tests
Rambler & Co (RU) Aleksandr Sychev - RDSDataSource: Clean tests with Swift
Rambler & Co (RU) Andrey Ryazanov - Test-Driven Development in iOS

Mobius

Mobius 2019 (EN) Ewa Ludwiczak, Aleksander Grzyb β€” Layers of Testing in iOS Applications
Mobius 2016 (RU) Evgenyi Matsiuk β€” Writing Testable Code

Misc

fwdays (RU) Alexey Demedetsky - Unit Testing in Swift
NSSpain 2017. Dave Schukin - Why You Shouldn’t Write Tests (Yes, We’re Going There)
Swift London, Yvette Cook - Understanding Rx Swift using Rx Tests
Devoxx Belgium. Maxime David - How to test your awesome iOS mobile application?
MOConfBy, Eleni Papanikolopoulou - Venturing the world of Rx Swift Unit Testing
Pivotal Labs. Alex Tamoykin - Test Driven Development with Xcode
Jon Reid - Test Driven Development for iOS

πŸ’‘ Docs, Blogs Posts and Written Tutorials:

A

Apple - Unit Testing Concepts
Andrew Bancroft - Unit Testing Model Layer with Core Data and Swift
Adam Borek - RxTest. How to test the Observable in Swift
agnosticdev.com - How to Write Unit Tests in Swift
Alexander Grebenyuk - Rx Swift Testing
Alexander Murphy - The Guide to Unit Testing in Swift with Apollo and GraphQL (Part One)
atomicobject.com: Matt Nedrich - Testing with Swift – Approaches & Useful Libraries
albertodebortoli.com - The Template for View Controller Unit Testing
albertodebortoli.com - Offline UI Testing on iOS with Stubs
Agranat Mark - Mocking in Swift with Sourcery (RU)
appcoda.com - Automated UI Tests
appcoda.com - Unit Testing in Swift
appcoda.com - TDD with Quick & Nimble
appunite.com - How to test iOS apps with Combine, ReactiveSwift and Rx Swift

B

Bleeding Edge. Matthew Liam Healy - Writing better unit tests in Swift: Part One
Benoit Pasquier - Unit Testing your MVVM architecture in Swift
Benoit Pasquier - Rx Swift & MVVM - How to use Rx Tests to test your ViewModel

C

CocoaAcademy - Setup your iOS Testing Env
Cocoa with Love - Testing Actions Over Time
Chris Eidhof - QuickCheck-in Swift
cobeisfresh.com - Unit Testing iOS in Swift: A Testable Architecture
cocoacasts.com - What Are You Testing
cocoacasts.com - Write Better Code By Writing Unit Tests
cocoacasts.com - How To Generate Code Coverage Reports In Xcode With Slather
cocoacasts.com - How To Enable Code Coverage In Xcode
cocoacasts.com - How to Mock and Stub a System Class in Swift: Part 1
cocoacasts.com - How to Mock and Stub a System Class in Swift: Part 2
cocoacasts.com - How to Mock and Stub a System Class in Swift: Part 3
cocoacasts.com - How to Unit Test Private Methods in Swift
clean-swift.com - To mock or not to mock
clean-swift.com - Does stubbing give you an empty feeling – am I stubbing too much?
clean-swift.com - Data independence is key to robust architecture and non-fragile unit tests
clean-swift.com - Seed data for your unit tests
clean-swift.com - How to mock an Apple built-in class
clean-swift.com - Advanced Dependency Injection
clean-swift.com - Unit Testing and TDD Terminology
clean-swift.com - How to Make Your Unit Tests Run Faster

F

freecodecamp.org (Navdeep Singh) - How to run tests in Rx Swift
FlawlessApp Blog. ShihTing Huang - The complete guide to Network Unit Testing in Swift
FlawlessApp Blog. ShihTing Huang - Cracking the Tests for Core Data
FlawlessApp Blog. ShihTing Huang - Applying Unit Tests to MVVM with Swift
FlawlessApp Blog. Leandro PΓ©rez - Memory Leaks in Swift (Testing for Leaks)

G

girappe.com - Using SwiftyMocky to generate mocks and simplify unit testing in Swift

H

Humble iOS Developer - Testing with Moya 101
hoangtran.me - How to unit test your Realm database layer

I

iOS Unit Testing by Ron Lisle
initwithstyle.net - TDD in Swift Playgrounds

J

Joe Susnick - How to test a Nib
John Reid (Quality Coding) - How to Make Specialized Test Assertions in Swift
John Reid (Quality Coding) - I’m Pretty Sure Most of Us Are Wrong about XCTestCase tearDown...
John Reid (Quality Coding) - Design Pattern for Tests that Do Real Networking
John Reid (Quality Coding) - How Does Swift Support Stubbing and Mocking?
John Reid (Quality Coding) - How to Design Swift Mock Objects
John Reid (Quality Coding) - Partial Mock: Have You Wished You Could Fake a Return Value in Swift?
John Reid (Quality Coding) - Swift Mock Objects: How to Avoid Fragile Tests
John Reid (Quality Coding) - Mocking Standalone Functions
John Reid (Quality Coding) - Swift Unit Testing Template

K

Krzysztof ZabΕ‚ocki - Testing iOS Apps

M

Marco Santa - Test Doubles In Swift
MarisiBrothers.com - Common unit testing techniques on iOS
Mike Ash - Writing Unit Tests
mokacoding.com - Testing callbacks in Swift with XCTest

N

NSHipster - Unit Testing

M

Marin Todorov - Testing your Rx Swift code, part 1
Marin Todorov - Testing your Rx Swift code, part 2
Marin Todorov - Testing with Rx Blocking, part 1
Marin Todorov - Testing with Rx Blocking, part 2

O

objc.io - Issue #15: Testing
Oleg Dreyman - Taking Dependency Injection one step further with Swift

P

Practical iOS Dev - Four simple rules for architecting iOS unit tests

R

raizlabs.com - XCTest and Optional Unwrapping
raywanderlich.com - Testing Your RxSwift Code
raywanderlich.com - iOS Unit Testing and UI Testing Tutorial
raywanderlich.com Dominik Hauser - Swift Unit Testing: Mocking Objects
raywanderlich.com Audrey Tam - iOS Unit Testing and UI Testing Tutorial
Rodrigo Cavalcante - Unit Testing UITableView
roadfiresoftware.com - How to Write Unit Tests in Swift 4
Robert C. Martin - The Cycles Of TDD
Robert C. Martin - The Pragmatics Of TDD
robkerr.com - Flexible and Easy Unit Testing of CoreData Persistence Code

S

Swift 2 Go - How to test with fake data on ios
Swift by Sundell - Unit Testing
Swift by Sundell - Mock-free Unit Tests in Swift
Swift by Sundell - Unit Testing in Playgrounds
Swift by Sundell - Using Unit Tests to Identify and Avoid Memory Leaks
Swift by Sundell - Mocking in Swift
Swift by Sundell - Testing Swift Code That Uses System Singletons in 3 Easy Steps
Swift by Sundell - Time Traveling in Swift with Unit Tests
Swift by Sundell - Reducing Flakiness in Swift Tests
Swift by Sundell - Getting Started with xCode UI Testing in Swift
Swift by Sundell - Avoiding Force Unwrapping in Swift Unit Tests
Swift by Sundell - Making Swift tests easier to debug
swiftyjimmy.com - How to unit test ViewModel in Swift
Shashikant Jagtap - Network Stubbing options for XCTest and XCUITest in Swift

V

vincit.com - Unit testing Rx Swift application

Y

Yet Another Swift Blog by Vadim Bulavin - Real World Unit Testing in Swift

W

williamboles.me - Can unit testing and CoreData become BFFs?

πŸ‘¨πŸΌβ€πŸ’» Checklists & Notes:

iOS Testing Manifesto (by Hesham Salman)
Unit Testing Patterns (by Clint Cabanero)
Testing Notes (by Ivan Kusalic)

πŸ“» Podcasts:

FatalError - Getting Started with Unit Testing
FatalError - Hypothetical Testing Tricks
FatalError - Testing Your Network Layer
Podlodka podcast (RU) - Test-Driven Development
RayWenderlich - Unit Testing with Ellen Shapiro
Inside iOS Dev - Testing in Object-Oriented Applications
Inside iOS Dev - Introduction to Dependency Injection
Swift Unwrapped - Testing Swift

πŸ“Ί Video Tutorials:

Alexito's World - Testing an operator with TestScheduler, Rx Swift
RayWanderlich.com RWDevCon 2016: Xcode UI Testing - Live Tutorial Session
Essential Developer - Building a Swift Quiz App with TDD and Modular Design
Swift Programming Tutorials - Testing Asynchronous Code in Swift 3
LetsBuildThatApp.com Brian Woong - What is Unit Testing, Why We Use It, and Sample Test Cases
Code Pro - iOS Unit Test Mocking Tutorial

πŸ“¦ Awesome Curated Lists (Testing Tools/Frameworks)

Awesome-iOS Testing - iOS testing tools/frameworks.
Awesome-Swift Testing - Swift testing tools/frameworks.


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
swift (7,272)Β 
ios (3,327)Β 
testing-tools (186)Β 
unit-testing (175)Β 
tdd (149)Β 
swift5 (97)Β 
test-driven-development (45)Β 
swift-4 (44)Β 
testing-framework (34)Β 

Find Open Source By Browsing 7,000 Topics Across 59 Categories