DEV Community

Jamshid Tursunboyev
Jamshid Tursunboyev

Posted on

Is it important to learn Android testing as a beginner?

I am currently learning Android development. It seems everybody is talking why every dev should use unit tests and how it is important. But as a beginner I find it really difficult to understand with all new concepts. Should I learn about testing before getting job or should I focus more on Android core concepts and make more apps for practice?

Top comments (9)

Collapse
 
derekjhopper profile image
Derek Hopper

That same question is in my head as I dabble in iOS development. I'll share my thoughts and maybe it will help add to the discussion.

I've been writing code for over 10 years. I understand the benefits of testing (huge benefits), so naturally I thought I should write tests as I learn iOS development. After thinking about it, I decided not to. Here's why.

You already have enough in your head when you're learning something new. If you focus on building what you want, you'll have more success and learn more about Android. Trying to write tests is adding another point of possible failure. I feel it's important to find a lot of "wins" when you're early in a project/framework. Few people want to work on something that doesn't build for weeks. In Android/iOS development, you want to see your app running - it makes you feel good.

Plus, I feel like you need another level of understanding to write tests that make sense. Tests can help you, sure, but it really depends on your goals.

Get your Android app working first. Build features even if it's not the best way to build it. Come back later and refactor. Companies like people who can get shit done.

Andy Hunt recently wrote on Twitter: One Weird Old Trick to learn how to write software: Write software. twitter.com/PragmaticAndy/status/9...

I think you're on the right track. Good luck!

Collapse
 
gladuz profile image
Jamshid Tursunboyev

Your thoughts on "best way" of building is related to me. I always have a trouble with getting things done. I overthink about architecture, clean code, patterns etc.. and at the end I will do nothing :). Thanks for your attention!

Collapse
 
aralroca profile image
Aral Roca

If you have now a lot of new concepts... Spend more time on Android core concepts.

Keep in mind that testing is important in every project, but if you are learning Android, first achieve your goal. Then, when you will be more comfortable with Android core concepts, learn unit tests.

I'm sure that if you understand the Android core concepts, then testing should be easier to understand. Also, companies that want a Android developer are looking for the skills in Android. Of course, they will prefer if you know about unit test and integration tests, but some companies understand that if you don't have the knowledge in testing, you can learn it fast in the process, especially in juniors.

Collapse
 
gladuz profile image
Jamshid Tursunboyev

Thanks for the suggestion. I think you are right about learning at work. It is just a lot of concepts to learn, so I need to prioritize them.

Collapse
 
itsjzt profile image
Saurabh Sharma

totally agree with you @aralroca , for testing you need to have projects so first make projects.

Collapse
 
pabiforbes profile image
Pabi Forbes

I am fairly new to android development, and I suggest getting the core concepts out the way first. I am currently in a grad program, and we focused on android concepts, architecture components, and then we focused on writing unit and ui tests.
When you get more comfortable with android development, you can then focus on the testing and as you get into it, you will realize that tests are handy in the long run.

Collapse
 
stephen_coyle profile image
Stephen Coyle • Edited

Employers will always look favourably on developers who can write testable code and unit tests for the code they have written.

Test Driven Development is an excellent way to do this, but difficult if you are learning on your own.

I think, creating your own app and getting it in the Play Store is the best way to learn. Start with the usual Todo app or weather app. And move up from there.

But do try and test your smaller methods.

Collapse
 
gauravchaddha1996 profile image
Gaurav Chaddha

If you are beginner/junior developer, companies won't care that you don't know testing. It will only be seen as an advantage but not as a requirement. In my opinion, learn about core concepts first.

Collapse
 
gladuz profile image
Jamshid Tursunboyev

Yeah, everybody is telling the same thing. I will definitely pay more attention to core concepts. Thank you for your advice!!