0
votes

I am running a CODED-UI test as a command in my Jenkins workflow. This command works when executed in the server machine's cmd window but fails when executed through Jenkins with the error.

"Error calling Initialization method for test class xxx.xx.xx.CodedUITest.CodedUITest3: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: To run tests that interact with the desktop, you must set up the test agent to run as an interactive process. For more information, see "How to: Set Up Your Test Agent to Run Tests That Interact with the Desktop" (http://go.microsoft.com/fwlink/?LinkId=255012) If you are running the tests as part of your team build, you must also set up the build agent to run as an interactive process. For more information, see "How to: Configure and Run Scheduled Tests After Building Your Application" (http://go.microsoft.com/fwlink/?LinkId=254735)" .

I installed Testagents , selected the option to make it desktop interactive process but the error still persists. The user ID provided in the testagent is the same user ID used for calling the command.

Trying to figure out what else I am missing.

Command used : C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\MStest.exe /testcontainer:"E:\workspace\Microsoft\xxx\Publish\Test2.orderedtest"

1

1 Answers

0
votes

You need to install test agent. You have a Jenkins Server and from tehre you are triggering the coded ui. For coed ui tests to run u have to install and mention the test agent where to run your test. that agent should have VSTS installed in it. You can have server and agent on same machine if needed.