控制台应用程序启动codedUI测试 [英] Console App to start a CodedUI test
问题描述
我有,我想通过使用批处理,它的一个.dll文件启动codeD的UI测试。
I have a coded ui test that I want to start by using batch, its a .dll file.
我是从一个批处理文件调用它的原因是,在此之前的测试就可以进行服务器已重新启动。
The reason I'm calling it from a batch file is that the server has to be restarted before this test can be carried out.
难道仅仅是一个简单的调用Test.dll的
或做我必须做其他的东西?
Is it just a simple call test.dll
or do I have to do other stuff?
更新 code找到的
Playback.Initialize();
TestProject.CodedUITest1 coded = new TestProject.CodedUITest1();
coded.CodedUITestMethod1();
Playback.Cleanup();
从<一个拿href=\"http://blogs.microsoft.co.il/blogs/shair/archive/2010/07/15/running-$c$cdui-test-from-another-application.aspx\"相对=nofollow>在这里,从私有程序集其丢失的两个参考addings:
Take from Here, Its missing two reference addings from the private assemblies:
- Microsoft.VisualStudio.TestTools.UITest.Extension.Uia.dll
- Microsoft.VisualStudio.TestTools.UITest.Extension.IE.dll
希望这有助于其他人要做到这
Hope this helps other people looking to do this
推荐答案
您不能运行一个DLL文件像您可以一个exe。一个DLL包含code旨在通过程序使用,这意味着code的一个来源可以通过许多程序,从而节省了复制code使用。
You can't run a Dll file like you can an exe. A Dll contains code intended to be used by a program, it means one source of code can be used by many programs, which saves duplicating the code.
通常情况下,DLL将已经记录的功能,你可以通过一个程序中调用,除非你自己动手建在这种情况下,你就会知道:)
Usually the Dll will have documented functions you can call via a program, unless you built it yourself in which case you would know :)
尝试并发现使用DLL程序和调用,或者找到的文档为它并运行 RUNDLL32
作为@PA功能。建议。
Try and find the program that uses the Dll and call that, or find the docs for it and run the function from rundll32
as @PA. suggested.
这篇关于控制台应用程序启动codedUI测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!