While developing applications, you might make various mistakes in the implementation that could lead to incorrect software operations, such as showing improper data, navigating to a different screen than planned, or even crashing. Of course, you should try to limit such situations, but how can you find such problems and fix them before deployment? The natural answer is by testing, but what do you mean by testing?
Will you just launch the application in an emulator or a real device and use it as a potential user? Of course, such a testing process is really useful and important. However, what will you do after you make the changes in the project? Will you introduce such testing again and again? It seems to be very time-consuming and not so interesting, doesn't it?
In this chapter, you will get to know another approach and learn how to create a unit test to introduce automatic testing for your application.