How to run NUnit test in Visual Studio Team Services

Jose Alonso Monge picture Jose Alonso Monge · Oct 20, 2016 · Viewed 9.4k times · Source

When I try to execute NUnit test in VSTS task I am getting the following error:

Warning: The path 'C:\a\1\s\INCASOL.IP\packages' specified in the 'TestAdapterPath' does not contain any test adapters, provide a valid path and try again.

I have these tasks in VSTS:

enter image description here

The "Run unit test" task is configured as follows: enter image description here

Note I have set the "Path to Custom Test Adapters".

I think the dlls for NUnit are properly copied to packages folder because in "Nuget restore" task I can see the following:

Added package 'NUnit.2.6.4' to folder 'C:\a\1\s\INCASOL.IP\packages'

Notes: The NUnit version is 2.6.4 and I'm using Hosted Agent

Answer

Jose Alonso Monge picture Jose Alonso Monge · Oct 20, 2016

After a few hours looking for a solution, I solved it few minutes after having asked my question. Although I could run my test in my local machine using NUnit Test Adapter, this package hadn't been added to my packages folder. So, once I run

Install-Package NUnitTestAdapter

for my test projects, everything works fine.