Test Driven Android Development
I was always wondering about the Test Driven Development. It was stated When I was doing my GSoC 2016 project Mifos Android-Client. I had to write the Unit and Instrumentation Testing of the previous features and new ones that I was going to write.
In starting, I was doing the Google and reading the blogs and Github projects. I found it is good to learn, how can we write the test because TDD comes after you are good in writing the Unit and Instrumentation test. It’s not necessary that you should be expert in writing the test cases, but you should be familiar with Unit and Instrumentation.
Here are steps that I followed during whole summer.
3. What is TDD, How it works?
4. It’s time to replace your present development structure with TDD.
Now Let me tell you the whole process in stepwise.
1. Architecture: There are lot’s of architecture but I am following two
You can start with anyone but If you don’t have experience with MVP so start with Ribot MVP boilerplate architecture.
2. I can feel the pain If you are writing the test cases first time in your life. Sometime It can take a day to pass the test case.
Here are some good articles that gave me confident and Now I have good understanding regarding the Unit and Instrumentation testing.
You can also read about the Unit and integration testing in MVP architecture by Google and Ribot sample.
3. Now we are familiar with MVP architecture and Testing. Let’s read about the TDD. I found some good blogs that are very helpfull for me.
4. If you have followed the above steps then It’s time to implement TDD in your next project.
Best of Luck 👍