Visual Studio Online CI Nunit Tests not found during build

I have a VSO (f.k.a TFS) Git project that builds and deploys properly but can't find the unit tests in the solution.

This is the message I see...

No test found. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.

In my build definition I specify

 - Run tests in test sources matching **\Test*.dll, Target platform: 'X86'

My solution structure is like this

/Tests.Unit.ProjectName/Tests.Unit.ProjectName.csproj
/ProjectName/ProjectName.csproj

Answers


Another option is to install the NUnit Test Adapter for VS2012 and VS2013 NuGet package in the unit test project. The build server will find it there. No other changes needed.


To run NUnit tests, the build system needs to be told where it can find the 3rd party test runner assemblies. Currently it can't load those from a Git Repository. But... It can load them from a Team Foundation Source Control folder in another Team Project. So simply create an empty project using the standard source control and reference the assemblies from there.

In this doc, you're explained how to configure Team Build to load nUnit tests. The basic thing is that you need to copy the Test Runner assembles and stick them in a TFVC repository. You then need to tell the Build Controller where it can find these assemblies.

The hosted build controller can load these assemblies from any team project within your VSO account, so just create a second project which can store these.

See also:


Need Your Help

Simplest way to wait some asynchronous tasks complete, in Javascript?

javascript node.js asynchronous mongoose synchronous

I want to drop some mongodb collections, but that's an asynchronous task. The code will be:

What is 'define' used for in JavaScript (aside from the obvious)?

javascript requirejs requirejs-define

I have searched high and low for documentation on this, but I just cannot find anything anywhere.