I'm using Visuial Studio's Coded UI Tests to run Automated UI tests on a WPF Application everytime a build runs on my TFS server. The problem I am running into is dynamically launching the executable based on the path where it was just built to, including the configuration(x86, x64).
Is there any way to get the path to an executable in a referenced project so that I can launch the application dynamically from my test project?
MSTest:
In your [TestInitialize]
add the following to launch your app:
_yourApp = ApplicationUnderTest.Launch(Path.Combine(Directory.GetCurrentDirectory(), "yourexecutablename.exe"));
In your [TestCleanup]
you add the following:
_yourApp.Close();
NUnit: (you will need to reference and use Microsoft.VisualStudio.TestTools.UITesting)
In your [Setup]
add the following to launch your app:
_yourApp = ApplicationUnderTest.Launch("yourexecutablename.exe"));
In your [Teardown]
you add the following:
_yourApp.Close();
note: I have not verified the NUnit implementation