Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Real World Mocking in Swift

try! Swift Conference via YouTube

Overview

Explore practical mocking techniques in Swift for efficient unit testing in this 27-minute conference talk from try! Swift Tokyo 2016. Discover how to create simple, maintainable mocks without relying on OCMock, focusing on key parts of your codebase. Learn about asynchronous tests, dependency injection, and best practices for mocking, including strategies for NSUserDefaults and time-dependent code. Gain insights into controlling complexity and the future of mocking in Swift from LinkedIn software engineer Veronica Ray, as she shares her expertise on writing fast, reliable tests that don't interfere with production data.

Syllabus

Intro
Asynchronous tests
Mock frameworks
Mocks take time
Why Mocks
Why Tests
Dependency Injection
Why use Dependency Injection
stub API
time machine
Mocking
Best Practices
NSUserDefaults
Time Traveler
Controlling Complexity
Future of Mocking

Taught by

try! Swift Conference

Reviews

Start your review of Real World Mocking in Swift

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.