microsoft / vstest

Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console.
MIT License
902 stars 323 forks source link

Unable to discover some unit test projects #460

Closed srivatsn closed 7 years ago

srivatsn commented 7 years ago

From @niemyjski on February 8, 2017 17:2

Since the latest VS2017 RC3 update I'm unable to discover all of my unit test projects... Just clone (https://github.com/exceptionless/foundatio) and try building different projects / run the Foundatio.Redis tests (they aren't found or listed in the test runner). I haven't tried via the command line

Copied from original issue: dotnet/sdk#839

niemyjski commented 7 years ago

I tried to run the tests via the command line dotnet test tests\foundatio.redis.tests\foundato.redis.tests.csproj and they ran.. so it appears to be just a VS issue

codito commented 7 years ago

The tests are not discovered because following dependencies are not present in Foundatio.Redis.Tests csproj:

    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-*" />
    <PackageReference Include="xunit" Version="2.2.0-*" />
    <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-*" />

After adding them, tests show up.

codito commented 7 years ago

Closing this. Please reopen if you still observe this behavior.