Member-only story
RxSwift Unit Testing Explained in 2 Minutes
Using RxTest and RxBlocking libraries
Published in
2 min readApr 2, 2020

Today we will learn how to test our RxSwift apps using RxTest and RxBlocking libraries. Our sample project follows a reactive MVVM architecture.
The source code of the project is available at the bottom of the article.
Let’s Start
We have the following screen:

And the following structure inside the ViewController
:
We can see that we have a UIStackView
containing three UIButton
s. The logic inside the ViewModel
allows only one button to be selected: