Swift
XCTest
Lyla.
2023. 8. 2. 10:45
테스트 코드를 위한 애플의 프레임워크
- Unit Test
- UI Test
- Performance Test

tearDown()
: 현재 테스트 환경을 정리한다. 테스트 중에 생성된 모든 리소스나 객체를 정리 하는 용도로 사용, 각 테스트가 격리되고 후속 테스트에 영향을 줄 수 있는 잔여 효과를 막기 위함
예시 코드

https://developer.apple.com/documentation/xctest
XCTest | Apple Developer Documentation
Create and run unit tests, performance tests, and UI tests for your Xcode project.
developer.apple.com
애플 테스트 튜토리얼
https://developer.apple.com/tutorials/app-dev-training#tests
Develop apps for iOS | Apple Developer Documentation
Learn the basics of Xcode, SwiftUI, and UIKit to create compelling iOS apps.
developer.apple.com