Swift Testing
Installation
SKILL.md
Swift Testing Standards
Priority: P0
Implementation Guidelines
XCTest Framework
- Standard Naming: Prefix test methods with
test(e.g.,testUserLoginSuccessful). - Setup/Teardown: Use
setUpWithError()andtearDownWithError()for environment management. - Assertions: Use specific assertions:
XCTAssertEqual,XCTAssertNil,XCTAssertTrue, etc.
Async Testing
- Async/Await: Mark test methods as
asyncand useawaitdirectly inside them. - Expectations: Use
XCTestExpectationfor callback-based or delegate-based async logic. - Timeout: Always set reasonable timeouts for expectations to avoid hanging CI.
Test Organization
Related skills
More from hoangnguyen0403/agent-skills-standard
skill creator
Standards for creating new High-Density Agent Skills with optimal token economy.
183caveman
>
1java-language
Modern Java 21+ standards including Records, Pattern Matching, and Virtual Threads. Use when working with Java records, sealed classes, switch expressions, text blocks, Optional, or upgrading from older Java versions. (triggers: **/*.java, pom.xml, build.gradle, record, sealed, switch, var, Optional, stream, VirtualThread, instanceof, text block)
1swift swiftui
Standards for State Management, View Lifecycle, and Property Wrappers
1swift tooling
Standards for SPM, Build Configs, and Code Quality
1database-redis
Optimize Redis caching, key management, and performance. Use when implementing Redis caching strategies, managing key namespaces, or optimizing Redis performance.
1