Testing RxRealm with RxBlocking

Testing RxRealm with RxBlocking

Realm + RxSwift testing with RxBlocking

Bbb75c4dd2e17a7e3114c730ec7144d0?s=128

Marin Todorov

December 06, 2017
Tweet

Transcript

  1. Testing RxRealm
 with RxBlocking RxSwift Berlin Marin Todorov

  2. RxRealm realm.io

  3. None
  4. None
  5. • Completely Asynchronous • Notifications will be bundled by Realm

    • Objects can change over time Testing Realm
  6. Test: collection emits when objects added [Message1] Realm.rx.add(...) Observer Observable<Results<Message>>

    [Message1]
  7. RxTest

  8. RxTest

  9. RxTest

  10. Test: collection emits when objects added [Message1] Realm.rx.add(...) Observer Observable<Results<Message>>

    [Message1]
  11. RxBlocking

  12. RxBlocking!

  13. Some Numbers RxRealm test suite with RxTest: 1570 loc RxRealm

    test suite with RxBlocking: 921 loc
  14. Test: observer handles error when observable errors out

  15. Test: collection emits when objects deleted

  16. Test: eventually changes from all threads will emit ... add

    objects on main queue, on background queque, sync on current queue, etc...
  17. None
  18. Test: view model emits when speaker favorited

  19. Test: model emits when resultset changes ... ...

  20. • EventKit - github.com/realm/EventKit • RxRealm - github.com/RxSwiftCommunity/RxRealm • RxBook

    - store.raywenderlich.com/products/rxswift Marin Todorov @icanzilb Updated! RxSwift 4