Discovering unit tests fail when test project references a second test project
See original GitHub issueAll 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.
Issue Analytics
- State:
- Created 7 years ago
- Comments:19 (6 by maintainers)
Top Results From Across the Web
How To Resolve Issue Of Test Project Not Running The ...
This is the scenario of the Test project using xunit framework for unit tests. The below image shows the error that I got...
Read more >Unit Tests not discovered in Visual Studio 2017
Solution was removing my app.config file from my unit test project. The tests will re-appear! This file referenced some dll's in the ...
Read more >Test Explorer not discoverying test methods
I created one test method in a test project in a solution, did a build, test explorer not seeing test. Close solution, open...
Read more >Run unit tests with Test Explorer - Visual Studio (Windows)
Test Explorer can run tests from multiple test projects in a solution and from test classes that are part of the production code...
Read more >Problems with .NET unit testing
JetBrains Rider automatically detects unit tests and provides a unit test runner to ... project I have an issue with references a .net...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@eegasai Adding the following dependency into the test projects fixed it for me:
"Microsoft.DotNet.InternalAbstractions": "1.0.0"
worked for me.