In this video, we'll dive deep into the process of migrating your setUp and tearDown functions from the XCTest framework to init and deinit methods in Swift Testing.
This migration can help streamline your test suite, but there’s a crucial caveat you need to be aware before migrating tearDown to deinit. I’ll walk you through the potential pitfalls and share best practices to ensure your tests run smoothly and reliably.
Github Post: https://github.com/swiftlang/swift-te...
Migrating from XCtest: https://developer.apple.com/documenta...
Content:
0:00 - Intro
0:07 - Explaining setUp/tearDown
3:36 - Migrating to init
6:50 - Migrating to deinit
10:13 - Workaround deinit
12:44 - Outro
---
Previous Episode (Conditional Tests): • Mastering Swift Testing: Conditional ...
Swift Testing Playlist: • Swift Testing
OnlineStoreMV Project: https://github.com/pitt500/OnlineStor...
Xcode 16's Code Completion: • First Look at Xcode 16's Code Complet...
-----
Other videos from my channel:
Podcast: • Swift and Tips Podcast
any Protocol (Existential Types): • "any" Keyword and Existential types i...
The Composable Architecture (TCA): • The Composable Architecture
Apple Watch Layout using Geometry Reader: • Building Apple Watch Layout with Geom...
Key Paths: • The Anatomy of a Key Path
Result Builders: • Result Builders in Action: Simplifyin...
Types of Access Control: • All types of Access Control in Swift ...
Generics: • Generics
-----
My Contact:
https://www.swiftandtips.com
/ swiftandtips
https://iosdev.space/@swiftandtips
/ pedrorojaslo
Watch video Mastering Swift Testing: Migrating XCTest setUp/tearDown to init/deinit (with a caveat ⚠️) online without registration, duration hours minute second in high quality. This video was added by user Swift and Tips 10 August 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 618 once and liked it 19 people.