1
votes

I have a solution with a number of nUnit tests that do not appear to run on Visual Studio Online servers. Here's what I've done so far:

  1. Created a separate folder (outside of my branch structure) that has nUnit test adapter DLLs
    source control structure

  2. Build controller is configured with a path to custom assemblies to point to nUnit folder that has adapter DLLs
    build controller properties

  3. Build's test Source is configured as: " - Run tests in test sources matching *test*.dll;*test*.appx,Target platform: 'X64'" build definition

Build controller reports during the build

Run optional script after MSBuild
Run optional script before Test
Runner Run VS Test Runner
Run Continuous Deployment

No test results afterwards.

No test results
No code coverage results

What am I doing wrong? Do nUnit tests require special attributes to run properly on VSO? Am I missing any other configuration settings?

I've followed this link when configuring: http://www.visualstudio.com/get-started/hosted-build-controller-vs#supplemental_binaries

Edit: Test settings expanded as requested test settings

Appreciate any help!

1

1 Answers

2
votes

Well, I never setup a TFS build before, let alone an online one, until now (TeamCity fan), so I copied every single property from the screenshots and the only way I could get it to pseudo-"pass" (fully green, with no No test found. Make sure that installed test discoverers & executors warnings under Other Errors and Warnings) is when it didn't find any *test*.dll assemblies to load to begin with, rather than no [Test] methods to execute. Did you check your MSBuild log to make sure your test project assemblies are copied and match the pattern?

_CopyFilesMarkedCopyLocal:
  Copying file from "C:\a\src\Alertera-Scheduler\packages\NUnit.2.6.3\lib\nunit.framework.dll" to "C:\a\bin\nunit.framework.dll".
  Copying file from "C:\a\src\Alertera-Scheduler\packages\NUnit.2.6.3\lib\nunit.framework.xml" to "C:\a\bin\nunit.framework.xml".
CopyFilesToOutputDirectory:
  Copying file from "obj\Debug\Alertera-Scheduler.Tests.dll" to "C:\a\bin\Alertera-Scheduler.Tests.dll".
  Alertera-Scheduler.Tests -> C:\a\bin\Alertera-Scheduler.Tests.dll
  Copying file from "obj\Debug\Alertera-Scheduler.Tests.pdb" to "C:\a\bin\Alertera-Scheduler.Tests.pdb".
Done Building Project "C:\a\src\Alertera-Scheduler\Alertera-Scheduler.Tests\Alertera-Scheduler.Tests.csproj" (default targets).
Done Building Project "C:\a\src\Alertera-Scheduler\Alertera-Scheduler.sln" (default targets).

Could you expand your Test source settings as well?

If you click Open Drop Folder (Build details in VS) > Diagnostics (tab in VSO) what does it say under Run VS Test Runner?

Run VS Test Runner 00:00:00
There were no matches for the search pattern C:\a\bin\*test2*.dll
There were no matches for the search pattern C:\a\bin\*test*.appx