Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy directories to test output folders in Visual Studio 2008 Team System?

When open my LocalTestRun.testrunconfig file Deployment section I can choose which files are deployed to the Test output folders, but I need that a specific file to be deployed in a given subfolder. How to do that?

like image 210
Jader Dias Avatar asked Sep 21 '09 23:09

Jader Dias


2 Answers

You can specify subdirectories for files or directories using the outputDirectory attribute of the DeploymentItem element:

<TestRunConfiguration ...>
...
  <Deployment>
    <DeploymentItem filename="%File or Directory to deploy path%" 
                    outputDirectory="%output subdirectory%" />
  • filename attribute can contain absolute paths or relative paths(to the RelativePathRoot which is the directory of the solution containing your test project)
  • if you want to deploy a directory, all files in that directory will be copied to the destination subdirectory but not the directory itself, i.e.: will copy files from Dir1 directly under Dir2, no directory 'Dir1' will be creaed under Dir2 to contain these files.
  • outputDirectory attribute contains destination subdirectory under the deployment root directory

O_o

like image 77
manji Avatar answered Nov 14 '22 21:11

manji


I had the same issue, where integration tests where dependent on files being in a specific folder. I ended up adding a script to the post build event of one of my projects to copy in the files to the right location using xcopy.

like image 37
Jonathan van de Veen Avatar answered Nov 14 '22 23:11

Jonathan van de Veen