pnp.gif

How to enforce a quality gate prior to check-in

J. D. Meier, Jason Taylor, Alex Mackman, Prashant Bansode

To enforce quality gate prior to check-in, configure check-in policies like code analysis, work item, testing and any other required custom check-in policy.

By configuring various check-in policies, it’s required to run various quality checks like code analysis, work item, testing etc this ensuring that code quality is maintained at the time of check-in.

To configure a check-in polices to enforce quality gate prior to check-in:
  • From Team Explorer, right-click your team project, point to Team Project Settings, and then click Source Control.
  • Click Check-in Policy and then click Add.
  • In the Check-in policy list, select policy type and then click OK
  • When you are satisfied with the settings for the check-in policies, click OK; the new check-in policy now displays with future check-ins.

VSTS provides following check-in policies out of box
  • Code Analysis - Requires that code is error free and code analysis is run before check-in.
  • Testing - Requires run check-in tests before check-in, which could be your unit tests.
  • Work Items - Require that one or more work items be associated with every check-in.

Additionally you can create your own custom check-in policies which will enforce your project specific quality gates for example you want to enforce that user adds comments, runs additional acceptance tests, certain pragma directives in C# are not used to suppress XML documentation warnings or the projects are configured to generate XML documentation during compilation.

Additional Resources

Last edited Mar 21, 2007 at 10:52 PM by prashantbansode, version 3

Comments

No comments yet.