Suche senden
Hochladen
RxSwift Testing 같이 시작하기 feat. RxBlocking, RxTest
•
3 gefällt mir
•
945 views
Byeongchan Lee
Folgen
RxBlocking과 RxTest를 통해 RxSwift를 테스트하는 법을 간단하게 알아봅시다.
Weniger lesen
Mehr lesen
Software
Melden
Teilen
Melden
Teilen
1 von 89
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경
LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경
Mintak Son
20220716_만들면서 느껴보는 POP
20220716_만들면서 느껴보는 POP
Chiwon Song
만화경 앱 개발기(iOS)
만화경 앱 개발기(iOS)
ssuserb942d2
InjectionIII의 Hot Reload를 이용하여 앱 개발을 좀 더 편하게 하기.pdf
InjectionIII의 Hot Reload를 이용하여 앱 개발을 좀 더 편하게 하기.pdf
정민 안
MVC, MVVM, ReactorKit, VIPER를 거쳐 RIB 정착기
MVC, MVVM, ReactorKit, VIPER를 거쳐 RIB 정착기
정민 안
Hello, ReactorKit
Hello, ReactorKit
Suyeol Jeon
ReactorKit으로 단방향 반응형 앱 만들기
ReactorKit으로 단방향 반응형 앱 만들기
Suyeol Jeon
Intro to Asynchronous Javascript
Intro to Asynchronous Javascript
Garrett Welson
Empfohlen
LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경
LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경
Mintak Son
20220716_만들면서 느껴보는 POP
20220716_만들면서 느껴보는 POP
Chiwon Song
만화경 앱 개발기(iOS)
만화경 앱 개발기(iOS)
ssuserb942d2
InjectionIII의 Hot Reload를 이용하여 앱 개발을 좀 더 편하게 하기.pdf
InjectionIII의 Hot Reload를 이용하여 앱 개발을 좀 더 편하게 하기.pdf
정민 안
MVC, MVVM, ReactorKit, VIPER를 거쳐 RIB 정착기
MVC, MVVM, ReactorKit, VIPER를 거쳐 RIB 정착기
정민 안
Hello, ReactorKit
Hello, ReactorKit
Suyeol Jeon
ReactorKit으로 단방향 반응형 앱 만들기
ReactorKit으로 단방향 반응형 앱 만들기
Suyeol Jeon
Intro to Asynchronous Javascript
Intro to Asynchronous Javascript
Garrett Welson
20221131_레츠스위프트_2022_iOS개발에서_알아두면_좋은것들.pdf
20221131_레츠스위프트_2022_iOS개발에서_알아두면_좋은것들.pdf
정민 안
The Art of Clean code
The Art of Clean code
Victor Rentea
Playwright: A New Test Automation Framework for the Modern Web
Playwright: A New Test Automation Framework for the Modern Web
Applitools
A Framework Driven Development
A Framework Driven Development
정민 안
결제를 구현하고 싶은 개발팀을 위한 안내서
결제를 구현하고 싶은 개발팀을 위한 안내서
수보 김
introduction to Vue.js 3
introduction to Vue.js 3
ArezooKmn
Vue Vuex 101
Vue Vuex 101
LocNguyen362
Jetpack Compose beginner.pdf
Jetpack Compose beginner.pdf
AayushmaAgrawal
Kotlin
Kotlin
Rory Preddy
Getting Started with React.js
Getting Started with React.js
Smile Gupta
Playwright Begginers Presentation
Playwright Begginers Presentation
FranPerea6
learn what React JS is & why we should use React JS .
learn what React JS is & why we should use React JS .
paradisetechsoftsolutions
Real Life Clean Architecture
Real Life Clean Architecture
Mattia Battiston
Railway Oriented Programming
Railway Oriented Programming
Scott Wlaschin
Introduction to Coroutines @ KotlinConf 2017
Introduction to Coroutines @ KotlinConf 2017
Roman Elizarov
[수정본] 우아한 객체지향
[수정본] 우아한 객체지향
Young-Ho Cho
Let'Swift 2023 iOS 애플리케이션 개발 생산성 고찰 - 정시 퇴근을 위해 우리는 어떻게 해야할 것인가?
Let'Swift 2023 iOS 애플리케이션 개발 생산성 고찰 - 정시 퇴근을 위해 우리는 어떻게 해야할 것인가?
정민 안
Async code on kotlin: rx java or/and coroutines - Kotlin Night Turin
Async code on kotlin: rx java or/and coroutines - Kotlin Night Turin
Fabio Collini
React + Redux Introduction
React + Redux Introduction
Nikolaus Graf
#살아있다 #자프링외길12년차 #코프링2개월생존기
#살아있다 #자프링외길12년차 #코프링2개월생존기
Arawn Park
Weitere ähnliche Inhalte
Was ist angesagt?
20221131_레츠스위프트_2022_iOS개발에서_알아두면_좋은것들.pdf
20221131_레츠스위프트_2022_iOS개발에서_알아두면_좋은것들.pdf
정민 안
The Art of Clean code
The Art of Clean code
Victor Rentea
Playwright: A New Test Automation Framework for the Modern Web
Playwright: A New Test Automation Framework for the Modern Web
Applitools
A Framework Driven Development
A Framework Driven Development
정민 안
결제를 구현하고 싶은 개발팀을 위한 안내서
결제를 구현하고 싶은 개발팀을 위한 안내서
수보 김
introduction to Vue.js 3
introduction to Vue.js 3
ArezooKmn
Vue Vuex 101
Vue Vuex 101
LocNguyen362
Jetpack Compose beginner.pdf
Jetpack Compose beginner.pdf
AayushmaAgrawal
Kotlin
Kotlin
Rory Preddy
Getting Started with React.js
Getting Started with React.js
Smile Gupta
Playwright Begginers Presentation
Playwright Begginers Presentation
FranPerea6
learn what React JS is & why we should use React JS .
learn what React JS is & why we should use React JS .
paradisetechsoftsolutions
Real Life Clean Architecture
Real Life Clean Architecture
Mattia Battiston
Railway Oriented Programming
Railway Oriented Programming
Scott Wlaschin
Introduction to Coroutines @ KotlinConf 2017
Introduction to Coroutines @ KotlinConf 2017
Roman Elizarov
[수정본] 우아한 객체지향
[수정본] 우아한 객체지향
Young-Ho Cho
Let'Swift 2023 iOS 애플리케이션 개발 생산성 고찰 - 정시 퇴근을 위해 우리는 어떻게 해야할 것인가?
Let'Swift 2023 iOS 애플리케이션 개발 생산성 고찰 - 정시 퇴근을 위해 우리는 어떻게 해야할 것인가?
정민 안
Async code on kotlin: rx java or/and coroutines - Kotlin Night Turin
Async code on kotlin: rx java or/and coroutines - Kotlin Night Turin
Fabio Collini
React + Redux Introduction
React + Redux Introduction
Nikolaus Graf
#살아있다 #자프링외길12년차 #코프링2개월생존기
#살아있다 #자프링외길12년차 #코프링2개월생존기
Arawn Park
Was ist angesagt?
(20)
20221131_레츠스위프트_2022_iOS개발에서_알아두면_좋은것들.pdf
20221131_레츠스위프트_2022_iOS개발에서_알아두면_좋은것들.pdf
The Art of Clean code
The Art of Clean code
Playwright: A New Test Automation Framework for the Modern Web
Playwright: A New Test Automation Framework for the Modern Web
A Framework Driven Development
A Framework Driven Development
결제를 구현하고 싶은 개발팀을 위한 안내서
결제를 구현하고 싶은 개발팀을 위한 안내서
introduction to Vue.js 3
introduction to Vue.js 3
Vue Vuex 101
Vue Vuex 101
Jetpack Compose beginner.pdf
Jetpack Compose beginner.pdf
Kotlin
Kotlin
Getting Started with React.js
Getting Started with React.js
Playwright Begginers Presentation
Playwright Begginers Presentation
learn what React JS is & why we should use React JS .
learn what React JS is & why we should use React JS .
Real Life Clean Architecture
Real Life Clean Architecture
Railway Oriented Programming
Railway Oriented Programming
Introduction to Coroutines @ KotlinConf 2017
Introduction to Coroutines @ KotlinConf 2017
[수정본] 우아한 객체지향
[수정본] 우아한 객체지향
Let'Swift 2023 iOS 애플리케이션 개발 생산성 고찰 - 정시 퇴근을 위해 우리는 어떻게 해야할 것인가?
Let'Swift 2023 iOS 애플리케이션 개발 생산성 고찰 - 정시 퇴근을 위해 우리는 어떻게 해야할 것인가?
Async code on kotlin: rx java or/and coroutines - Kotlin Night Turin
Async code on kotlin: rx java or/and coroutines - Kotlin Night Turin
React + Redux Introduction
React + Redux Introduction
#살아있다 #자프링외길12년차 #코프링2개월생존기
#살아있다 #자프링외길12년차 #코프링2개월생존기
RxSwift Testing 같이 시작하기 feat. RxBlocking, RxTest
1.
뱅크샐러드이병찬 RxTest 같이 시작하기 RxTest,
RxBlocking을 같이 알아보기!
2.
뱅크샐러드이병찬 RxTest 같이 시작하기 RxTest,
RxBlocking을 같이 알아보기!
3.
1. TestCode, ObservableTestCode란? 2.
RxBlocking에 대해 3. RxTest에 대해 4. RxSwift를 테스트해보자! 목차
4.
1. TestCode란?
5.
어떤 동작을 수행
했을 때 1) 원하는 값이 나오는지 검증 2) 연속되어야 하는 동작이 수행되는지 검증 TestCode란?
6.
원하는 값이 나오는지
7.
원하는 값이 나오는지
8.
원하는 값이 나오는지
9.
원하는 값이 나오는지 값이
원하는 형태로 나오는지 검증
10.
연속되어야 하는 동작을
수행하는지
11.
연속되어야 하는 동작을
수행하는지
12.
연속되어야 하는 동작을
수행하는지
13.
연속되어야 하는 동작을
수행하는지
14.
연속되어야 하는 동작을
수행하는지 연속되어야 하는 동작의 수행 검증
15.
그럼 Observable은?
16.
17.
RxTest 새내기 "이뱅샐"
18.
19.
20.
21.
Event를 동기적으로 받을
수는 없을까? subscribe없이 Event를 받을 수는 없을까?
22.
Hot Observable일 때는? reduce도
못하는데…
23.
기대하는 타이밍에 Event가
나오는지 검증은? 버튼 눌렀을 때 Event가 나오는지 검증해야 하잖아?
24.
25.
/* Event를 간단하게
추출할 수 있어야 함 /* 원하는 값이 원하는 타이밍에 나오는지 검증
26.
RxBlocking RxTest 어서와, 테스트는
처음이지?
27.
2. RxBlocking
28.
🍏 🍇 🌶
🌽 🍉
29.
🍏 🍇 🌶
🌽 🍉 ➜ [ 🍏, 🍇, 🌶, 🌽, 🍉 ]
30.
31.
32.
33.
onComplete가 떨어질 때까지 기다린다…
34.
35.
🍏 🍇 🌶
🌽 🍉 ➜ [ 🍏, 🍇, 🌶, 🌽, 🍉 ] onComplete가 꼭 떨어져야 함
36.
.toBlocking(timeout: RxTimeInterval?)
37.
🍏 🍇 🌶
🌽 🍉 [ 🍏, 🍇, 🌶 ] ➜
38.
- ColdObservable의 Event를
검증할 때 사용 - 특정 시간동안 방출된 Observable의 Event도 검증 가능 • HotObservable도 사용 가능 RxBlocking은
39.
3. RxTest
40.
1초 2초 3초
4초 5초 🍏 🍇 🌶 🌽 🍉 ➜ [ (🍏, 1초), (🍇, 2초), (🌶, 3초), (🌽, 4초), (🍉, 5초) ] ➜ 3초에 🌶가 나왔는가?
41.
42.
43.
44.
let buttonTapped =
s.createHotObservable([ .next(1, Void()), .next(3, Void()) ])
45.
구독의 여부와 상관없이 이벤트
발생
46.
구독이 시작되면 정해진 순서대로
이벤트 발생
47.
1초 2초 3초
4초 5초 🍏 🍇 🌶 🌽 🍉 👀 관찰 👀 ➜➜ [ (🍏, 1초), (🍇, 2초), (🌶, 3초), (🌽, 4초), (🍉, 5초) ]
48.
👀 가상의 시간이
모두 흐를 때까지 관찰 👀
49.
👀 가상의 시간이
모두 흐를 때까지 관찰 👀 Observable이 끝나지 않아도 상관X
50.
👀 가상의 시간이
모두 흐를 때까지 관찰 👀 Hot Observable도 테스트 가능!
51.
52.
53.
54.
가상의 시간이 모두
흐를때까지..
55.
56.
- Observable에 시간개념을
넣어줌 • 이를 통해 언제 무엇이 나왔는지 검증 가능 - Observer를 통해 Hot, Cold 모두 검증가능 • 가상의 시간이 다 흐를 때까지 관찰 후 타이밍과 Event 반환 RxTest는?
57.
4. RxSwift를 테스트하자
58.
59.
- 원하는 값이
정상적으로 나오는지 검증 - Response에 상관없이 예상하는 결과가 나오는지 "isLoading" TestCase
60.
61.
62.
63.
64.
65.
66.
67.
✨
68.
69.
- tapped 되었을
때 마다 원하는 값이 정상적으로 나오는지 검증 - Response에 상관없이 예상하는 결과가 나오는지 "loading" TestCase
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
✨ ✨ ✨
80.
- Mocking, 가상의
시간, Observer.. 언제 배우나? - TestCode보다 기능 개발이 더 우선 아니야? RxBlocking, RxTest....
81.
func removeAllData() { /*
구현 */ Implements() }
82.
func removeAllData() { /*
구현 */ Implements() } 만약 삭제에서 누락된 데이터가 있다면?
83.
당연하게 동작할 것
같은 코드의 배신 ➜ Hotfix
84.
TestCode는 당연한 코드가 당연하게
동작하는지 검증
85.
RxSwift의 TestCode는 Observable이 당연하게
방출되는지 검증
86.
“RxSwift & 테스트코드와
함께 금융의 혁신을 만들어갈 전사들을 뱅샐은 기다립니다.”
87.
- RxTest, RxBlocking •
https://www.raywenderlich.com/7408-testing-your-rxswift-code • https://github.com/ReactiveX/RxSwift/blob/master/Documentation/UnitTests.md - Nimble • https://github.com/Quick/Nimble - Stubber • https://github.com/devxoul/Stubber 참고자료
88.
slido.com / #P445
Jetzt herunterladen