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.

Setting TestCaseAttribute.TestName in .NET Core project causes not running tests

See original GitHub issue

Named tests are not running via Visual Studio Test Explorer when using .NET Core.

image

Logs from Test Output: `[08.04.2020 8:59:20.647 AM Diagnostic] Enqueue operation ‘RunFromContextOperation’, hashcode:46380802 [08.04.2020 8:59:20.648 AM Diagnostic] Operation left in the the queue: 1 [08.04.2020 8:59:20.648 AM Diagnostic] ‘RunFromContextOperation’, hashcode:46380802 [08.04.2020 8:59:20.648 AM Diagnostic]

[08.04.2020 8:59:20.648 AM Diagnostic] Operation Dequeue : ‘RunFromContextOperation’ [08.04.2020 8:59:20.693 AM Diagnostic] Starting programmatic build of containers… [08.04.2020 8:59:20.807 AM Diagnostic] Completed programmatic build of containers. [08.04.2020 8:59:20.807 AM Diagnostic] TestContainer update (build) complete : 114 ms [08.04.2020 8:59:20.808 AM Diagnostic] DiscoveryOperation<RunFromContextOperation> FinishedChangedCotainers, changed container count is 1 [08.04.2020 8:59:20.808 AM Diagnostic] Discovering the following containers : [08.04.2020 8:59:20.808 AM Diagnostic] C:\Workspaces\Test\Tests\bin\Debug\netcoreapp3.1\Assembly.Tests.dll [08.04.2020 8:59:20.820 AM Informational] ---------- Discovery started ---------- [08.04.2020 8:59:20.823 AM Diagnostic] TelemetrySession: Creating the event: VS/UnitTest/TestWindow/Ext/RunSettingsService [08.04.2020 8:59:20.823 AM Diagnostic] Event:VS/UnitTest/TestWindow/Ext/RunSettingsService key: VS.UnitTest.TestWindow.RunSettingsService.Name value:VSTest Run Configuration [08.04.2020 8:59:20.823 AM Diagnostic] TelemetrySession: Creating the event: VS/UnitTest/TestWindow/Ext/RunSettings [08.04.2020 8:59:20.823 AM Diagnostic] Event:VS/UnitTest/TestWindow/Ext/RunSettings key: VS.UnitTest.TestWindow.RunSettings.Services value:1 [08.04.2020 8:59:20.824 AM Informational] ========== Discovery skipped: All test containers are up to date ========== [08.04.2020 8:59:20.824 AM Diagnostic] File timestamp remains 08.04.2020 08:45:43 for C:\Workspaces\Test\Tests\bin\Debug\netcoreapp3.1\Assembly.Tests.dll [08.04.2020 8:59:20.826 AM Diagnostic] Project Assembly.Tests references test adapter: NUnit3TestAdapter, version 3.15.1 [08.04.2020 8:59:20.852 AM Informational] Executing test method: Tests.SomeClassTests.Sum_ReturnSum [08.04.2020 8:59:20.902 AM Informational] ---------- Run started ---------- [08.04.2020 8:59:20.902 AM Diagnostic] TelemetrySession: Creating the event: VS/UnitTest/TestWindow/Ext/RunSettingsService [08.04.2020 8:59:20.903 AM Diagnostic] Event:VS/UnitTest/TestWindow/Ext/RunSettingsService key: VS.UnitTest.TestWindow.RunSettingsService.Name value:VSTest Run Configuration [08.04.2020 8:59:20.903 AM Diagnostic] TelemetrySession: Creating the event: VS/UnitTest/TestWindow/Ext/RunSettings [08.04.2020 8:59:20.903 AM Diagnostic] Event:VS/UnitTest/TestWindow/Ext/RunSettings key: VS.UnitTest.TestWindow.RunSettings.Services value:1 [08.04.2020 8:59:20.904 AM Informational] ========== Run finished: 0 tests run (0:00:00,0013159) ==========`

Visual Studio in version 16.3.10 Main project and Test project in .NET Core 3.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rprousecommented, May 9, 2020

I’m going to move this issue over to the adapter repo. We have several similar issues that were introduced by Visual Studio when they added real time test discovery.

0reactions
OsirisTerjecommented, Aug 27, 2021

Yes, please, that would be helful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting TestCaseAttribute.TestName in .NET Core project ...
Named tests are not running via Visual Studio Test Explorer when using .NET ... TestName in .NET Core project causes not running tests...
Read more >
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 >
NUnit cannot recognise a TestCase when it contains an array
Following on from this bug at JetBrains it looks as though the solution here is to use the TestName attribute on your different...
Read more >
TestCase
TestCaseAttribute serves the dual purpose of marking a method with parameters as a test ... Reason specifies the reason for not running this...
Read more >
too particular about .NET Core runtime version
Looking at the Tests output window pane, I see this: Testhost process exited with error: It was not possible to find any compatible...
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