title: How to exclude certain tests in the Visual Studio Test Runner?
body: <p>I have attributes on certain tests that I ideally don't want to run on every build. Most of my tests are normal unit tests and I do want them to run on every build.</p>
  
  <p><strong>So: how can I exclude a test by category or project type?</strong></p>
  
  <p>For example, I'd like to exclude <code>CodedUItests</code>:</p>
  
  <pre><code>[CodedUITest]
  public class SearchViewTests
  </code></pre>
  
  <p>...or exclude tests in a given <code>TestCategory</code>:</p>
  
  <pre><code>[TestMethod]
  [TestCategory("Database Integration")]
  public void ContactRepositoryGetByIdWithIdExpectCorrectContact()
  </code></pre>
  
  <p>I particularly want to exclude the coded UI tests as they disrupt my ability to continue working, whereas all the other tests will happily run in the background without disturbing me.</p>
  
  <p>Originally this question was about Visual Studio 2012, so I'd prefer solutions that work in that version and higher.</p>