Mastering Swift Testing: Eliminate Duplicate Tests with Parameterized Testing

Опубликовано: 23 Март 2025
на канале: Swift and Tips
507
19

Tired of copy-pasting tests for different inputs or adding unnecessary logic to handle multiple cases? In this video, we dive into the power of parameterized tests using the Swift Testing Framework to streamline your testing process and eliminate redundant code.

---

Previous Episode (Serial Tests):    • Mastering Swift Testing: Run Serializ...  
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...  

Content:
0:00 - Intro
0:07 - Explaining the test
2:00 - Old ways to test multiple inputs
4:30 - Creating Parameterized Tests
7:43 - Parameterized Tests with tuples
11:20 - Outro

-----

Other videos from my channel:
Parameter Packs:    • Creating tuples dynamically and refac...  
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