~/talk

Testing SwiftUI and Combine: The State of the Art

Talkat iOS Conf SG 2020 · on Thursday, 2020-01-30· [testing]
slides:none on file

Refactors a small weather app from RxSwift + UIKit to Combine + SwiftUI and shows what actually required testing work: a recorder subscriber to capture Combine emissions, custom test scheduler and assertions to simulate virtual time, and URLProtocol mocking for network responses. Location provider, API decode and view model tests translate almost one‑to‑one and pass, but SwiftUI button interaction needs an XC hack based on the old cavy runtime. Combine production code is easy to port, but Apple omits test helpers so several weekend‑sized test utilities are necessary.

AI-written summary · about

  1. 0:00The importance of testing
  2. 1:52Refactoring overview
  3. 4:24Testing location providers
  4. 9:00Weather API testing
  5. 12:28View model testing
  6. 17:07View and UI testing
  7. 26:27Conclusion and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.