Showing posts with label Console Application. Show all posts
Showing posts with label Console Application. Show all posts

Saturday, 29 March 2014

Execute Coded UI Test with Console Application

Can a Coded UI test executed with  a Console Application? Yes it is possible. I am going to explain how it can be done.

I am going to execute below simple hand written Coded UI test to launch a notepad, using a Console Application.


Create Console Application in VS 2012. Refer the Coded UI in the Console Application. Then add below references to below assemblies.

Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
Microsoft.VisualStudio.TestTools.UITest.Common.dll
Microsoft.VisualStudio.TestTools.UITest.Extension.dll
Microsoft.VisualStudio.TestTools.UITesting.dll
from C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PublicAssemblies\

Microsoft.VisualStudio.TestTools.UITest.Extension.IE.dll
from C:\Program Files (x86)\Common Files\microsoft shared\VSTT\11.0\

Microsoft.VisualStudio.TestTools.UITest.Framework.dll
Microsoft.VisualStudio.TestTools.UITest.Logging.dll
Microsoft.VisualStudio.TestTools.UITest.Playback.dll
from C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\

Then add below code to Console Application


This Console Application now can run Coded UI test.

Popular Posts