How to write tests for a software product.
This article is the final part of the block of the materials devoted to testing. This block was devoted to the following topics:
- What is the test? Place of testing in software product development [https://medium.com/@Bytepace/what-is-the-test-place-of-testing-in-software-product-development-7abf16cceb5b] — here we are speaking about the main points of software testing. There is a block diagram of the software testing process. There is talking about the types of testing: manual and automated.
- Testing with JUnit library for the Android platform. The basic approach to test development [https://medium.com/@Bytepace/testing-with-junit-library-for-the-android-platform-the-basic-approach-to-test-development-1bfdd438455f] — here the are considered the highlights of the Unit tests development for Android applications. Basic tools for writing tests are handled.
- Asynchronous tasks in the application and Android Instrumentation Test. Solutions[https://medium.com/@Bytepace/asynchronous-tasks-in-the-application-and-android-instrumentation-test-solutions-57d7b8c09e6b] — there is considered the problem of testing asynchronous tasks. Two ways of solving this problem are proposed. Recommendations for these methods using are presented.
All the highlights with the implementation of the tests itself will be omitted. It can be found in the previous articles.
As mentioned in the previous article, it should not to interfere the methods and objects related to the main job class with methods to test. Let’s do the following steps for it:
2) We brought out all the methods associated with the tests at the new class.
3) And edit the class MainActivityTest, java.
Class MainTestActivity, java will be as follows:
We rule the following points in the class with the tests MainActivityTest.java:
We run tests and check. As you can see, all the tests are passed.
After exposure with all three articles it should build the overall picture of the approach of creating tests and the using of its tools.
P.S. This article was written by BytePace mobile developer. You can look at his works and at the other articles here: http://bytepace.com/