I'm looking to run a batch file programmatically in C#, as part of a test (being run in MS TEST), which I have working on my local machine. The batch file I want to run is in the repository in a support folder that also contains source code. In VSTS the tests are run like this :
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "C:\International\InternationalAppAutomation\International.IntegrationTests.UI\International.IntegrationTests.UI\bin\Debug\International.IntegrationTests.UI.dll" "C:\International\InternationalAppAutomation\International.IntegrationTests.UI\International.IntegrationTests.UI\obj\Debug\International.IntegrationTests.UI.dll" /TestCaseFilter:"TestCategory=Explore" /Settings:"C:\International\InternationalAppAutomation\International.IntegrationTests.UI\International.IntegrationTests.UI\QA.testsettings" /logger:trx /TestAdapterPath:"C:\International\InternationalAppAutomation"
and since I am using relative paths to run the batch file it fails because VSTS runs from a different location than my local machine does. What is the recommended solution to this problem?
Note - I cannot put this batch file in the test output folder because it is very large and we don't want to copy it for each new test run.