Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No test assemblies found matching the pattern: **\*Test*.dll,!**\*TestAdapter.dll,!**\obj\**

Tags:

I am trying to implement a Gated Check-In process in Azure DevOps (VSTS) based on the success of the unit tests. However, I am consistently getting this warning/error that assemblies are not found.

##[warning]No test assemblies found matching the pattern: **\*Test*.dll,!**\*TestAdapter.dll,!**\obj\**.
##[debug]Processed: ##vso[task.issue type=warning;]No test assemblies found matching the pattern: **\*Test*.dll,!**\*TestAdapter.dll,!**\obj\**.
======================================================

All my unit tests run successfully in Visual Studio 2017 in Test Explorer locally.

The Azure DevOps documentation seems straightforward but it does not work when I follow it.

I am using a Hosted VS2017 Agent. The CI Build itself succeeds upon check in to TFS source control.

Log

screen 1
screen 2 screen 3 screen 4 screen 5 [screen 6]

like image 484
Andy Miller Avatar asked Sep 19 '18 05:09

Andy Miller


1 Answers

The "old" .NET had the files located in the Release folder (which is described by the BuildConfiguration variable).

.NET Core builds contain an extra folder:

Folder structure

YourNamespaceHere.UnitTests > bin > Release > netcoreapp2.1 > dll's

When you add an extra wildcard, the build will find the unittest dll's.

**\$(BuildConfiguration)\*\*unittests.dll

I have renamed the *Tests* part to *unittests.dll as my project also contains integrationtests.

enter image description here

like image 183
JeroenW Avatar answered Sep 21 '22 13:09

JeroenW