question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

33reactions
felschrcommented, Dec 1, 2016

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

    "Microsoft.DotNet.InternalAbstractions": "1.0.1-beta-003206",
8reactions
alzumacommented, Dec 2, 2016

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found