Continuous integration
It is not our intention to explain how to build a continuous integration system because it's out of the scope of this book and it is not usually the job of an Android developer to set up the environment. However, you should be aware of what it is and how it works as it's directly related with Android.
A good suite of automated tests is always better combined with CI or a continuous integration solution. This solution will allow us to build and test our application every time there is a code change.
This is the way most companies with big projects work. If they have a team of developers, the code is usually shared in a repository, and they build a CI system connected to the repository. Every time a developer makes and commits a change to the repository, the collection of tests is executed, and if the result is successful, a new Android executable file (APK) is built.
This is done to minimize the risk of problems. In a big application, which takes years to be developed...