unable to filter assemblies when running tests, all assemblies are always discovered

goblinfactory's Avatar


14 Feb, 2018 10:06 AM

Hi all

I am battling 2 setup a yml file that only runs tests from a single dll.

When the build kicks off, it 'finds' all the dll's regardless of what filter I configure and then runs the tests against all dlls with tests.
Even if I specify an assembly that doesn't exist, that seems to get ignored.
I've tried specifying the dll to run tests against using only and I've also tried exact single files, and also wildcards with a filter. Nothing seems to work.

The build hits the spot where unit tests are supposed to run, and then I see the line in the log saying "discovering tests" and then it runs everything. The filters I've specified get ignored.

This is a the last yml file configuration I have tried;

    version: 1.0.{build}
    image: Visual Studio 2017
      - cmd: dotnet restore
      verbosity: minimal
        - '**\Memstate.Test.dll'

Any help will be appreciated.

  1. Support Staff 1 Posted by Ilya Finkelshte... on 14 Feb, 2018 10:56 AM

    Ilya Finkelshteyn's Avatar

    Hi Alan,

    I do not see build URL, but the fact that you are using Visual Studio 2017 and run dotnet restore makes me think that you are running .NET Core tests. Test assembly detection and filtering works for classic .NET Framework tests. For NET Core tests we just detect all NET Core tests projects and run dotnet test against them. Please watch this issue for a fix. It should be done soon. For now workaround is using test_script and run dotnet test against project you need.


  2. 2 Posted by goblinfactory on 14 Feb, 2018 01:15 PM

    goblinfactory's Avatar

    Ah, that's exactly it, good to know I'm not crazy.
    Thank you for the work around, ..I will try that now.



    Alan Hemmings


    Director, Goblinfactory Limited
    Mobile - +44 (0) 7734 157754
    [email blocked]

    Registered in England & Wales, Company No. 4521933, CPC1, Capital Park,
    Fullbourn, Cambridge, CB21 5XE

  3. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:26 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac