We all see that everybody talks about and praising importance of unit tests, but when it comes to you, try it for the first time, you might have hard time to understand it, right?

We are now going to improve the most popular unit test in Android history!

@Test
fun `addition_isCorrect`() {
assertEquals(4, 2 + 2)
}

Well, I’m feeling that this buddy is still alive in many many repositories.

Note: Since I am going to talk about the basics and mostly the idea of testing, the libraries do not need much attention.

Basics

First things first, you need certain rules…


Story

Me, as a person who likes unit testing theoretically, never had a chance to write unit tests for a high-scale commercial app, but eventually got this opportunity and tried to do best about testing for the last 3 years, this is how it looks like from my own observation and experience.

Since software development supported by many visionary approaches, and people always seem to be liking it and get excited, but in reality this is not as easy as it sounds. Most known reasons that it is highly dependent on external factors such as product timeline, management decisions or…

Hacı Kanal

Lead Android Developer currently at Adesso Turkey, Retired Indie Game Developer, Amateur endurance cyclist

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store