Protected Branches and mandatory code review give you a fast way to get your entire team working on test coverage and coding standards.
You will need this tool if you are interested in continuous integration or continuous delivery. If you are adding continuous integration to your development process, you need tests. You need to get automated tests from your developers. If your developers are like my developers, some of them are enthusiastic about adding tests, and some of them don't bother. You probably work with smart, creative, opinionated individuals who don't always respond to requests exactly the way you want them to. You can flail around for months looking like a jerk, and still not get the tests and standards that you want.
Code review is a simple way to get what you want. You can send code changes to the team members who are enthusiastic about automated testing. They will review the changes and, when needed, ask for better test coverage and standards compliance. When we added this type of review to our process at Assembla, we got almost everything we wanted within the first week. The change was fast and permanent.
Protected branches give you a ONE CLICK way to get what you want:
* Mark your master or trunk branch (the branch you run CI on) as protected. Click. Now, users who are not on a special list cannot commit directly. They have to make merge requests, which will get reviewed.
* Git repositories give you a super simple way to enforce mandatory code review. The system will automatically take a push to a protected branch, and move it into a temporary branch with a merge request.
* Find the developers who support your initiative, and add them to the list of people who can write to the protected branch.
You can try training, incentives, and persuasion for months and not get the test coverage and standards compliance that you want. You will get them immediately with this simple tactic.
Protected branches are available for both Git and Subversion.
