다음을 통해 공유


Determining Whether Tests Passed in Team Build Orcas

In a blog post back in September of last year I described how to use a custom task to determine whether tests had passed in Team Build v1.  In Team Build Orcas, you should be able to accomplish this same goal using the new built-in task GetBuildProperties.  The following XML snippet in your build script (TfsBuild.proj) should do the trick:

   <Target Name="AfterTest">
    <GetBuildProperties TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildUri="$(BuildUri)">
      <Output TaskParameter="TestSuccess" PropertyName="TestSuccess" />
    </GetBuildProperties>
  </Target>

The property TestSuccess would then be 'true' if and only if all test runs succeeded for the build, just as in my previous post.  A bit easier, no?

Comments

  • Anonymous
    July 17, 2007
    Dave McKinstry on Part II - Build, Deploy and Database Connections. GertD on Table Structure Changes....
  • Anonymous
    November 05, 2007
    Got an email from Martin Woodward this morning asking: What would be your preferred way to fully fail