sdk: Discovering unit tests fail when test project references a second test project

All the code is located here: https://github.com/exceptionless/Foundatio (Windows 10 + RTM Bits)

------ Discover test started ------
Discovering tests in 'C:\Code\Foundatio\test\Foundatio.AWS.Tests\project.json' ["C:\Program Files\dotnet\dotnet.exe" test "C:\Code\Foundatio\test\Foundatio.AWS.Tests\project.json" --output "C:\Code\Foundatio\test\Foundatio.AWS.Tests\bin\Debug\net46\win7-x64" --port 26870 --parentProcessId 16516 --no-build]
'test-xunit' returned '-532462766'.
Discovering tests in 'C:\Code\Foundatio\test\Foundatio.Azure.Tests\project.json' ["C:\Program Files\dotnet\dotnet.exe" test "C:\Code\Foundatio\test\Foundatio.Azure.Tests\project.json" --output "C:\Code\Foundatio\test\Foundatio.Azure.Tests\bin\Debug\net46\win7-x64" --port 26875 --parentProcessId 16516 --no-build]
'test-xunit' returned '-532462766'.
Discovering tests in 'C:\Code\Foundatio\test\Foundatio.Redis.Tests\project.json' ["C:\Program Files\dotnet\dotnet.exe" test "C:\Code\Foundatio\test\Foundatio.Redis.Tests\project.json" --output "C:\Code\Foundatio\test\Foundatio.Redis.Tests\bin\Debug\net46\win7-x64" --port 26880 --parentProcessId 16516 --no-build]
'test-xunit' returned '-532462766'.
Discovering tests in 'C:\Code\Foundatio\test\Foundatio.Tests\project.json' ["C:\Program Files\dotnet\dotnet.exe" test "C:\Code\Foundatio\test\Foundatio.Tests\project.json" --output "C:\Code\Foundatio\test\Foundatio.Tests\bin\Debug\netcoreapp1.0" --port 26887 --parentProcessId 16516 --no-build]
[xUnit.net 00:00:00.0597555] Skipping: Foundatio.Tests (no reference to xUnit.net)

It seems to be occurring when a test project references another one. We do this because we have base classes in the main project and then integrations run those base tests and inject new implementations.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 19 (6 by maintainers)

Most upvoted comments

@eegasai Adding the following dependency into the test projects fixed it for me:

    "Microsoft.DotNet.InternalAbstractions": "1.0.1-beta-003206",

"Microsoft.DotNet.InternalAbstractions": "1.0.0" worked for me.

“Microsoft.DotNet.InternalAbstractions”: “1.0.1-beta-003206” Fixed XUnit problem…

Also, the team now has two Piotr’s, @piotroko and @piotrpmsft. Not at all confusing 👍

Since there is an available workaround, we’re not planning to investigate this issue. We’re focusing on the newer (MSBuild/csproj) based unit test platform, and most of our energy is going there. As @piotrpMSFT asked above, please let us know if it repros on Preview3+ tooling, we will be happy to investigate further.