Reputation: 61
I am trying to create an executable out of a Coded UI Test which opens a browser and performs a set of operations. I would prefer a simple .exe file instead of using a batch file or using MS Test Agent, to be able to run it across computers without issues. Any other way of executing the Coded UI Test with a simple click, without the use of Visual Studio is welcome.
Thanks.
Upvotes: 5
Views: 3894
Reputation: 3030
I know that is late, anyway this can serve to others more.
You can delegate this work to MSTest, you can do a .bat or make a console application that executes the next:
set MSTestEXE=%PROGRAMFILES%\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe
"%MSTestEXE%" /testcontainer:CodedUITest\bin\Debug\CodedUITest.dll
CodedUITest.dll is the dll that generates Visual Studio.
MsTest will execute all tests showing you the results on the CMD and even will generate the TestResult.trx file.
Upvotes: 1
Reputation: 9783
You cannot create a .exe file from CodedUi Project
but you can use another Project for that.
Step 1
Create your CodedUi Project
. Use the CodedUi Test Builder
to create your TestMethod(s)
that executes the actions you want.
Step 2
Create another Project that has a reference to your CodedUi Test Project
and calls your recorded Test Methods
. If you just need to run only one method then create a simple Console Application
. If you need something more complicated (e.g. choose the CodedUI Test Method
to run) a Windows Form Application
would be more appropriate.
Upvotes: 1