mohamedradwan.com - Nothing can beat experience
Post
Cancel

How to Copy Build output to a Lab Environment Machine for TFS2013

If you want to run Coded-UI test on Lab Environment machine then you need to copy the binaries files to that machine. You can create a script that does that, but you can also create some customization for the build process to do that as follows. In our scenario, we have two machines, the first one (Visual Studio 2013 ALM RTM) is a TFS machine with Test Control and the second one (Agent) is a machine with Test Agent.

Machines

The first step on the Agent machine is to share the folder that will hold the binaries.

Sharing

From the Tool Box, type get and drag and drop GetBuildDetail Activity. You need to put it between Update Build Number and Run on Agent. Click on variables and declare a new variable of type IBuildDetail to hold the return value from GetBuildDetail Activity. In my case, I called that variable RadwanBuildDetail.

IBuildDetail-GetBuildDetail

From the properties of the GetBuildDetail Activity, assign the result to the variable that we just declared.

Assign BuildDetail variable

From the Tool Box, drag and drop CopyDirectory. You must put it in Run on Agent. From the properties, select the source which is our variable and in the Destination, type the UNC path for our shared folder. Of course, in a real scenario, you will not hardcode that Destination; you will make that an argument, so you can enter that by just editing the Build Definition.

CopyDirectory Activity

If you run this build, the output of the drop folder will be copied to the Lab Management machine. More information and tutorial about customizing build process.

Trending Tags