How to create an executable file (preferably exe, not a command line) from an encoded interface test?

I am trying to create an executable file from the 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 the MS Test Agent to be able to run it through computers without problems. Any other way to execute an encoded user interface with a simple click, without using Visual Studio, is welcome.

Thanks.

+6
source share
2 answers

You cannot create an .exe file from the CodedUi Project , but you can use a different project for this.

Step 1

Create your CodedUi Project . Use CodedUi Test Builder to create TestMethod(s) that does the right TestMethod(s) .

Step 2

Create another project that references 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 (for example, select the CodedUI Test Method to run), the Windows Form Application more suitable.

+1
source

I know that it's late, anyway, it can serve others.

You can delegate this work to MSTest, you can make .bat or create a console application that does the following:

 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 run all the tests showing the results in CMD, and even create the TestResult.trx file.

+1
source

Source: https://habr.com/ru/post/914240/


All Articles