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.

Live Unit Testing not Discovering Tests

See original GitHub issue

Description

Live unit testing isn’t working w/ 2.1.0-beta2.

Steps to reproduce

What steps can reproduce the defect? File -> New MS Test Core Project -> Install 2.1.0-beta2 packages

Sample code.

Expected behavior

Live unit tests should run

Actual behavior

they don’t run

image

Environment

VS 2019 Preview, 16.5.0 Preview 1.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Kaelumcommented, Mar 31, 2020

@spottedmahn and @ekennedy6334 Check your solution files and see if they have a “GlobalSection(NestedProjects) = preSolution” section. If they do:

  • Close Visual Studio.
  • Make a copy of your solution file for safe keeping.
  • Completely delete that section in your solution file.

Once I did that, “Live Unit Testing” started working again. I’m not sure what that section of the solution file does, but deleting it doesn’t appear to have negative side effects for me.

0reactions
artyreddcommented, Feb 11, 2021

Just posting in case anybody has this issue recently like me. I had the exact same issue on Visual Studio 2019 Target: .NET 4.7.1. Absolutely no fixes on any thread, testing framework, or anything would fix the issue including restoring NuGets, Repairing VS, and adding adapter references. My solution was to reset all values in Test > Live Unit Testing > Options to EXACTLY match the following from How to configure and use Live Unit Testing

Read more comments on GitHub >

github_iconTop Results From Across the Web

Live Unit Testing FAQ - Visual Studio (Windows)
Why are my tests failing to run? · A common issue is that not all of the files are copied to the test...
Read more >
Live Unit Testing does not update test results live in 16.6.0 ...
Starting with a new MSTest project, using the default template, if try to start Live Unite Test it won't start reporting “No supported...
Read more >
Visual studio live unit testing not work properly
Looks like there is code (projects) not included in your unit tests that fail to compile, have your checked the 'Results' and 'Errors'...
Read more >
Live unit testing does not work with Source Generators
When starting Live Unit Testing it only discovers and runs tests from test project Stample.Working.Test. Tests from the project Sample.
Read more >
How To Resolve Issue Of Test Project Not Running The ...
Two of my test projects didn't run the test cases, it was about to start and took some time to run the test...
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