# Reactive abstractions and testing strategies for Android code

DevFeed: [Reactive abstractions and testing strategies for Android code](<https://devfeed.tech/articles/reactive-abstractions-in-android-world-29372.md>)

Original publisher: [Read original article](<https://arturdryomov.dev/posts/reactive-abstractions-in-android-world/>)

Author: Artur Dryomov

Published: 2018-08-26T00:00:00Z

Content type: opinion

Language: en

Sources: [Artur Dryomov](<https://devfeed.tech/sources/artur-dryomov.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [reactive](<https://devfeed.tech/topics/reactive.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>), [RxJava](<https://devfeed.tech/topics/rxjava.md>), [kotlin-coroutines](<https://devfeed.tech/topics/kotlin-coroutines.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [network](<https://devfeed.tech/tags/network.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-testing](<https://devfeed.tech/tags/unit-testing.md>)

## AI overview

This article argues that Android developers should design codebases as pragmatic, platform-agnostic JVM environments where framework interactions are isolated behind composable abstractions. Using RxJava examples, it explains how abstractions can improve consistency and make platform-related logic, such as retrying network requests after reconnection, easier to unit test.

## Source excerpt

Who knows how many test suites were not created because of a classic parry. It cannot be tested -- it uses a platform call! Well, it is not actually true all the time. Unit testing something that only a human eye and neural networks can catch -- like animations -- doesn't make sense. On the other hand, retrying a network request on a re-established connection can and should be tested. As a bonus, it is possible to gain a couple of perks.