Run Coded UI test from console application

冷暖自知 提交于 2019-12-02 09:44:05

问题


I'm fighting running a coded ui test from a console application.

I did the following (As the internet says)

Solution with 2 Projects: ColorChanger.app / ColorChanger.test

the console application has a reference to the test project and to Microsoft.VisualStudio.TestTools.UITesting

I would like to call the test like this:

static void Main(string[] args)
    {
        Playback.Initialize();
        var test = new CodedUITest1();
        test.change();
        Playback.Cleanup();
    }

I get the error "System.IO.FileNotFoundException

Die Datei oder Assembly \"Microsoft.VisualStudio.TestTools.UITest.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.":"Microsoft.VisualStudio.TestTools.UITest.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"}

I'm sorry it's in german but I'm shure you'll get it ;)


回答1:


You need to update the internal references as well.. . Try this http://blogs.microsoft.co.il/shair/2010/07/15/running-codedui-test-from-another-application/



来源:https://stackoverflow.com/questions/37033809/run-coded-ui-test-from-console-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!