Reputation: 103
How to set a relative path in a Generic Test's(Visual Studio 2010) working directory and summary results file ?
As far I looked there is no way to set these locations programmatically in Generic test because the generic test has only properties page and no page to write C# code.
I have a folder structure as follows
c:\Files\GenericTestFolder\generictest.sln c:\Files\SummaryFiles\summary.xml
Now I need to set the working directory to the following (To run an external program) c:\Files\
And the Summary Results file location to: c:\Files\SummaryFiles\summary.xml
I tried the following options to set the location of working directory(WD) and summary file(SF) location :
setting WD to "..\" or ".\" or "\" -> all of these seem to set the directory to c:\, so this is not useful for me.
Using a visual studio's inbuilt environment variable like %TestDeploymentDirectory% don't seem to work with "..\" , i.e %TestDeploymentDirectory% ..\ does not translate to parent of %TestDeploymentDirectory% during runtime.
Upvotes: 3
Views: 515