blog

Fail a build if tests fail

Published on
1 minute read

It took me longer than I thought it would to find this, but is you are using TFS2008 and you want builds to fail if any of the tests fail then you can add the following to the tests properties group in your build project (TFSBuild.prof)

<PropertyGroup>
  <!-- TEST ARGUMENTS
   If the RunTest property is set to true, then particular tests within a
   metadata file or test container may be specified here.  This is
   equivalent to the /test switch on mstest.exe.

   <TestNames>BVT;HighPriority</TestNames>
  -->
  <TreatTestFailureAsBuildFailure>true</TreatTestFailureAsBuildFailure>
</PropertyGroup>

Very handy…

Technorati Tags: TFBS    ALM    TFS 2008 

blog tfs-build tfs tfs2008 tools

Related blog posts

No related videos found.

Connect with Martin Hinshelwood

If you've made it this far, it's worth connecting with our principal consultant and coach, Martin Hinshelwood, for a 30-minute 'ask me anything' call.

Our Happy Clients​

We partner with businesses across diverse industries, including finance, insurance, healthcare, pharmaceuticals, technology, engineering, transportation, hospitality, entertainment, legal, government, and military sectors.​

Illumina Logo
Philips Logo
Bistech Logo
YearUp.org Logo
Sage Logo
Emerson Process Management Logo
Hubtel Ghana Logo
MacDonald Humfrey (Automation) Ltd. Logo
SuperControl Logo

NIT A/S

Lockheed Martin Logo
Alignment Healthcare Logo
Boxit Document Solutions Logo
New Signature Logo
Microsoft Logo
Higher Education Statistics Agency Logo
Akaditi Logo
ALS Life Sciences Logo
Washington Department of Transport Logo
Royal Air Force Logo
Washington Department of Enterprise Services Logo
Nottingham County Council Logo
Department of Work and Pensions (UK) Logo
New Hampshire Supreme Court Logo
Ericson Logo
Akaditi Logo
Healthgrades Logo
Capita Secure Information Solutions Ltd Logo
Illumina Logo

CR2