Search code examples
visual-studiotfstfs-2013

TFS 2013 gated checked in


I want to set up a gated checked-in policy for my project using TFS 2013 and VS 2013. I want to set up a process that before dev, checked in Unit Test and Code Quality analysis should run. I want to use Nunit for unit Test purposes. Can anybody share an example of how to set up the process?


Solution

  • Create a new build definition with a "Trigger of Gated" like so:

    Trigger set to Gated

    Then goto the "Process" tab and set it so that it does as many of the following as you like:

    1. Run Tests.
    2. Perform Code Analysis always.
    3. Pass MSBuild args to treat warnings as errors.

    enter image description here