0

Our CI environment setup with [TFS Server 2015 + Visual studio build tools 2017]. When I try to run C# based unit test on environment it shows this error TF900547: The directory containing the assemblies for the Visual Studio Test Runner is not valid ''.

Then I tried to fix the error by fallowing ways

  1. Installed VS test agent 2015 in the machine https://learn.microsoft.com/en-us/visualstudio/test/lab-management/install-configure-test-agents
  2. Copied C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow from my computer to exact location to CI machine.
    1. Changed test runner from Visual Studio Test Runner to MS Test Runner

But still same error. Looks like tfs server not able to find the test agent folder. Anyone has idea how to fix this

Nayana Adassuriya
  • 23,596
  • 30
  • 104
  • 147
  • Hi Nayana, any update on this? It's simply not support for now. If my reply helped or gave a right direction. Appreciate for a voting or [marking it as an answer](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) which will also helps others in the community. – PatrickLu-MSFT Sep 25 '17 at 02:16

1 Answers1

0

Seems you have VS 2017 Build Tools installed only, no VS IDE on the CI environment.

You need to install VS IDE. VS build tools doesn't contain the "test platform". In order to run the tests, you require to install full IDE.

Currently to run the VsTest task, the task has dependency on Visual Studio IDE. But some changes will have in the near future.

We have decided to go with a 'tools installer' which can be used to get the test platform instead of needing the IDE. If you have the IDE, great. If you don't, the tools installer will get the test platform on the agent for you. It is already on backlog and expected to be available on VSTS in a few sprints.

More details please take a look at the discussion in this issue: vstest capability not detected when installed without Visual Studio

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • I don't think it required to install whole Visual Studio. As this page explain in https://learn.microsoft.com/en-us/visualstudio/test/lab-management/install-configure-test-agents, installing of Test Agent would be enough – Nayana Adassuriya Sep 14 '17 at 03:11
  • @NayanaAdassuriya Actually this link is talking about **test control** and **test agent**. In tfs 2013 user need both test agents and test controls. However, with new test agent, you won't need a test controller because Agents for Microsoft Visual Studio handle orchestration by communicating with Team Services or TFS. It's explain `Will Test Agent 2015 support all the scenarios supported by Test Controller and Test Agent of Visual Studio 2013?` And it's not mentioned VS related is not required. IDE installation is the only way to get VSTest as a working System Capability. – PatrickLu-MSFT Sep 14 '17 at 03:32
  • @NayanaAdassuriya This is also confirmed from test team `nigurr` and `PBoraMSFT` " being able to run tests when Test platform is obtained through the Test Agent is on the backlog." in this thread : https://github.com/Microsoft/vsts-agent/issues/871 – PatrickLu-MSFT Sep 14 '17 at 03:40