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 script that do that but also you can create some customization for the build process to do that as the following.

In our scenario we have 2 machines, the first one (Visual Studio 2013 ALM RTM) it’s a TFS machine with Test Control and the second one (Agent) it’s a machine with Test Agent.
Machines
The first step on the Agent machine, 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 properties of the GetBuildDetail Activity assign the result to 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 UN path for our shared folder, of course in real scenario you will not hard coded that Destination and you will make that as argument; so you can enter that by just edit 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

 


Share This: