Testing with RxBlocking, part 2

Previously, I wrote about the basics of testing with RxBlocking in Testing with RxBlocking, part1. Since then, I presented 2 times at meetups about MVVM and RxBlocking and I thought I’d post few more examples in a broader context. But first a question I got several times already when discussing RxBlocking. When to use RxBlocking vs. RxTest? RxTest is a great library for testing RxSwift code. It offers everything you need to test your Rx code and in most cases it’ll be everything you need.

Testing with RxBlocking, part 1

Whenever you decide to test your Rx code you have not one but two excellent choices - RxTest and RxBlocking. In this blog post I’ll go over the RxBlocking API and explain shortly how does the libary work. In Part 2 I’ll go over a bunch of real-life examples from open source I’ve written. Testing with RxTest pod RxTest to install it to your test suite from https://github.com/ReactiveX/RxSwift/tree/master/RxTest

observeOn vs. subscribeOn

Cross-thread subscriptions is a question that seems to pop up again and again on the RxSwift Slack channel. The explanation is very simple so I thought it was a good idea to put it in a blog post so whenever needed I can link to it instead of typing everything again and again. Observable subscriptions The terminology in regard to subscribing and observing is imho a bit messy so let’s first take this out of the way (do not skip this section!