1
votes

We use TFS to build our project. When the last projects completes a successful build, we use the post build event for that project to run a batch file.

We recently added a tests project, which runs after the build process completes, which means the batch file fires first after after the last project builds successfully but not after successful test run.

How do you set up a batch file to run only after successful test completion in TFS?

1
Are you using Workflow for the builds? Also, what version of TFS/Visual Studio are you running?Taegost
No we are not using workflow, and TFS 2012.Rob

1 Answers

1
votes

In TFS 2012 you'll need to edit the build workflow to do this. You need to add an InvokeProcess activity at some point after the workflow runs your tests. See the ALM Ranger Build Guidance for more info on how to customize build workflows: http://vsarbuildguide.codeplex.com/

If you were using TFS 2013 the new TfvcTemplate.12.xaml includes the ability to specify a powershell file to run right from the build definition (no workflow customization required)