Cor*_*ory 22 automated-tests visual-studio-2010 coded-ui-tests
每次在我的TFS服务器上运行构建时,我都在使用Visuial Studio的编码UI测试在WPF应用程序上运行自动UI测试.我遇到的问题是根据它刚刚构建的路径动态启动可执行文件,包括配置(x86,x64).
有没有办法在引用的项目中获取可执行文件的路径,以便我可以从我的测试项目中动态启动应用程序?
Ada*_*dam 24
MSTest的:
在您[TestInitialize]
添加以下内容以启动您的应用:
_yourApp = ApplicationUnderTest.Launch(Path.Combine(Directory.GetCurrentDirectory(), "yourexecutablename.exe"));
Run Code Online (Sandbox Code Playgroud)在你的[TestCleanup]
你添加以下内容:
_yourApp.Close();
Run Code Online (Sandbox Code Playgroud)NUnit :(您需要引用并使用Microsoft.VisualStudio.TestTools.UITesting)
在您[Setup]
添加以下内容以启动您的应用:
_yourApp = ApplicationUnderTest.Launch("yourexecutablename.exe"));
Run Code Online (Sandbox Code Playgroud)在你的[Teardown]
你添加以下内容:
_yourApp.Close();
Run Code Online (Sandbox Code Playgroud)注意:我还没有验证NUnit的实现
归档时间: |
|
查看次数: |
12520 次 |
最近记录: |