Viktor Matskevich

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:

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:

1) We create a MainTestActivity.java class and inherit MainActivity.java class.

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.
Thanks for reading!