티스토리 뷰
WWDC 2018 - What's New in Testing 의 Parallel Testing 내용을 기록 ✏️
[1] Parallel Testing이란
XCODE9 부터 Parallel Destination Testing을 지원한다.

예전에는 테스트를 디바이스별로 나눠서 돌리는게 아니라
디바이스1에서 모든 테스트 다 돌고, 디바이스2에서 모든 테스트 다 돌고 했었는데

이제는 진짜 parallel하게 테스트를 나눠서 돌아서 테스트 시간이 훨씬 줄었다.

자세히 살펴보자!
엑스코드는 각 uitest도는 앱(Runner라고 표현)에게 테스트를 나눠준다.

정확히 말하면 XCode는 각 Runner에게 테스트 클래스를 나눠준다.
(각각의 테스트 메소드를 나눠주는게 아님)

그래서 꿀팁을 주셨는데 코드가 많은 클래스를 쪼개라고 하셨다.

왜냐면 클래스별로 나눠서 돌리니까 테스트 메소드가 많으면 (주황색 클래스)
테스트가 오래 걸리는데

두개로 쪼개면 더 빨리 테스트가 끝나기 때문이다.

[2] Demo
paralell testing으로
test가 14초에서 5초로 줄어들어서 박수받는 데모를 보여주셨다.
Edit Scheme > Execute in parallel 켜고

테스트 돌리면

XCODE는 시뮬레이터의 multiple clones를 만든다.

참고로 실제 돌려보니까 4개의 클론이 떴고
Clone 1 of iPhone 12
Clone 2 of iPhone 12...
이런식으로 네이밍이 표시 되었다.

아무튼 14초에서 5초로 줄었다!!

[3] xcodebuild 옵션 설정
터미널 명령어 xcodebuild로 했을때 다음과 같은 옵션을 지정할 수 있다.
1) Runner(worker)의 갯수를 정할수있다.

2) parallel 할지말지를 정할 수 있다.

'🍏 > Unit & UI Test' 카테고리의 다른 글
Mocks Aren't Stubs (마틴 파울러) (0) | 2022.01.07 |
---|---|
[Unit Test] 테스트 리포트 보는 여러가지 방법 (slather / xcpretty / xcresult) (1) | 2020.07.16 |
[RxBlocking] toBlocking()과 BlockingObservable (0) | 2020.04.14 |
[SPM & UnitTest] 편리한 extension을 테스트 코드와 함께 작성하고 SPM에 넣자 (0) | 2019.12.24 |
[XCTUnwrap] 강제 언래핑과 XCTUnwrap으로 한 언래핑의 차이점 (0) | 2019.12.10 |
- Total
- Today
- Yesterday
- flutter build mode
- Flutter 로딩
- Flutter Text Gradient
- Flutter getter setter
- Django Heroku Scheduler
- 장고 URL querystring
- Dart Factory
- Watch App for iOS App vs Watch App
- 구글 Geocoding API
- ipad multitasking
- flutter deep link
- DRF APIException
- flutter 앱 출시
- METAL
- 플러터 얼럿
- PencilKit
- cocoapod
- drf custom error
- Django FCM
- SerializerMethodField
- flutter dynamic link
- ribs
- Django Firebase Cloud Messaging
- github actions
- 장고 Custom Management Command
- Sketch 누끼
- Python Type Hint
- Flutter Clipboard
- 플러터 싱글톤
- Flutter Spacer
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |