xunit tests in netstandard 2.0 project not discovered

peter.morlion's Avatar

peter.morlion

07 Nov, 2017 09:19 AM

I have a solution containing three netstandard 2.0 projects and 3 xunit projects. Everything builds fine, but AppVeyor doesn't run the tests. The build log says "Discovering tests...OK" and then just continues on. My source can be found on GitHub here

These tests are discovered by both Visual Studio and ReSharper.

I've tried adding the xunit.runner.console package and adding the test line in the appveyor.yml file, but that didn't change anything.

I've seen this issue, but reading the latest comments, it seems it should be working now? Or at least attempting to run the tests?

Any ideas? Or should I still trigger the tests myself with dotnet test?

  1. 1 Posted by Ilya Finkelshte... on 07 Nov, 2017 11:33 PM

    Ilya Finkelshteyn's Avatar

    Hi Peter,

    We rely on existence of Microsoft.NET.Test.Sdk package to make a decision if project is .NET Core test project or not. I found this discussion and indeed maybe it is not mandatory package. However I am not sure we can safely remove this condition when detecting test projects, at least without extensive testing.

    I filed this issue for myself.

    Can you consider adding this package to your project or you will add manual test commands?

  2. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:21 AM.

  3. peter.morlion re-opened this discussion on 10 Jul, 2019 01:27 PM

  4. 2 Posted by peter.morlion on 10 Jul, 2019 01:27 PM

    peter.morlion's Avatar

    Hello Ilya,

    It seems I forgot about this issue, but I wanted to reply nonetheless. I would find it rude if I didn't. My issue was indeed fixed by adding the Microsoft.NET.Test.Sdk package. It didn't seem necessary to run my tests locally, which might be why I never added it. But the xunit documentation adds it too. Anyway, it's fixed. Thanks for your answer, and sorry for my late reply.

    Peter

  5. 3 Posted by Ilya Finkelshte... on 10 Jul, 2019 05:29 PM

    Ilya Finkelshteyn's Avatar

    Oh, no worries at all and thank you for the update :)

  6. Ilya Finkelshteyn closed this discussion on 10 Jul, 2019 05:29 PM.

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

Keyboard shortcuts

Generic

? 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