0
votes

I have few Coded UI tests which are not in TFS. I was running these tests as ordered test from the CommandLine using the command:

vstest.console OrderedTest2.orderedtest

Now, I want to run this through Jenkins but i am seeing the below error:

Error Message: Error calling Initialization method for test class SAClientAutomation.testsuites.SABVTSuite: 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)

I have installed Test Agent and Test Controller but i don't what to next.

The code is not in TFS. Is TFS & MTM(Microsoft Test Manager) compulsory to achieve this?

1
The error message indicates that you need to set up the test agent to run as an interactive process, did you follow the link in the error message to configure it? - Eddie Chen - MSFT
Yes. I have done exactly as the that link says. But my Test agent is showing error that Test Agent is not configured with Test Controller. When i google How to Configure Test Agent with Test Controller. It seems we need MTM to achieve this. So my question is , Is there easy way to do this or Do i need MTM and TFS to achieve this. TIA . - user2048204
Could you fix it? I am facing the same thing as you did. - Bruno Casarotti
@BrunoCasarotti, No Bruno, Couldn't fix it :( - user2048204

1 Answers

0
votes

Yes, TFS & MTM can run Coded UI tests. If you use TFS 2015.1 and previous versions, you need MTM to run the Coded UI tests, check: https://msdn.microsoft.com/en-us/library/ff472576(v=vs.120).aspx.

If you use TFS 2015.2 and later versions, you can use Run Functional Tests task directly in TFS build definition to run Coded UI tests. Check https://blogs.msdn.microsoft.com/visualstudioalm/2016/03/31/executing-automated-tests-in-build-vnext-using-test-plan-test-suites/.

In order to run coded UI tests in TFS 2015.2 and later, you need to deploy build agent and test agent in Interactive Process: