0

We have created a build definition in TFS 2013 that runs unit tests and then calls a PowerShell script once completed.

What we would like is the ability to pass the results of the unit test (passed/failed) to the PowerShell script so that a check can be done to verify if the unit tests passed.

Is there a parameter that can be used in the 'Post-test script path' setting or a possible workaround?

1 Answers1

0

You should be able to use the predefined variable/property combo BuildDetail.TestStatus.

Keith Hill
  • 194,368
  • 42
  • 353
  • 369
  • Thanks @KeithHill for your reply. I tried using BuildDetail.TestStatus in my PowerShell script but its coming back as null. – Preetesh May 07 '14 at 04:21
  • Before you invoke PowerShell, try using a WriteBuildMessage with that property value in the message. Be sure to set the importance to High to make sure the message shows up in the build output. Just wondering if that value is valid in the part of the workflow you're trying to use it. – Keith Hill May 07 '14 at 04:59