简体   繁体   中英

Run Coded UI test from console application

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 ;)

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM