A few months ago I wrote a blog post under a similar title about better Unit Testing for Kotlin with Kotest (formerly KotlinTest). The focus of that post was to demonstrate a TDD/BDD friendly testing framework for Kotlin that is more organized, boilerplate free, and self-documenting.
I have been using Kotest for about a year now and it is safe to say that it has encouraged me to test more of my code. Frameworks like Kotest and Spek provide a good alternative for unit testing. However, UI testing still feels lacking.
Most Android developers are using Espresso for writing UI tests. Even with its super clean API, Espresso feels repetitive and verbose. My general solution is to work around this by extracting the repetitive code for reuse. …
Testing is hard and not everyone likes to spend their time writing unit tests when they could be building shiny new features.
Almost every developer understands the value of testing their code. However, most of us fall prey to laziness in the face of approaching deadlines and the prospect of more exciting work.
In this post, let’s understand why unit tests serve as the backbone of successful products and learn a new way of writing tests that is much simpler, intuitive and appealing.
Since I mostly work with Android applications, I’ll let you in on a little secret. More than half of the codebases you will come across will have little to no tests. …