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.

Problems when I activate Live Unit Testing using NUnit in a Visual Studio 2017 Test Project

See original GitHub issue

@licjapodaca commented on Sun Aug 05 2018

I’m using Visual Studio 2017 Enterprise 15.7.6 and a Test Project with the following Nuget Packages:

image

The problem is that when I activate Live Unit Testing (LUT) in VS2017 and specify in a Test Method the attribute [TestCase] in some cases works the LUT but when I mke some change in source code other Test Methods are excluded from LUT as you can see in the next image:

image

The source code that has the TestCase attribute is the following:

[Test]
[TestCase(null), TestCase(""), TestCase(" ")]
public void Log_InvalidError_ThrowArgumentNullException(string error)
{
	var logger = new ErrorLogger();

	Assert.That(() => logger.Log(error), Throws.ArgumentNullException);
}

NOTE: If I stop and start again LUT in VS2017 the Test Method mentioned at the beginning of this ISSUE is included correctly, but again if I refactor the source code, the LUT exclude the same Test Method again.

Is there a workaround for this problem?

Thanks for your help in advance.


@licjapodaca commented on Tue Aug 07 2018

Anybody?


@CharliePoole commented on Tue Aug 07 2018

Moving this to the nunit3 vs adapter repository, where it’s likely to get more attention.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
licjapodacacommented, Aug 15, 2018

Finally, today I upgrade my Visual Studio to 15.8 and the issue was gone…

Live Unit Testing with NUnit finally works.

Thanks @OsirisTerje for your help.

Greetings

0reactions
OsirisTerjecommented, Aug 8, 2018

It should be due soon. The minor release rhythm is approximately 6 weeks (see https://docs.microsoft.com/en-us/visualstudio/productinfo/vs2017-release-rhythm) and 15.7 was released May 7th, so it should not be long. They never give fixed dates though, so the rhythm is all we ave to go by.
But, if you create a small repro I can check the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Live Unit Testing FAQ - Visual Studio (Windows)
Why does Live Unit Testing show incorrect coverage after you upgrade the test adapter referenced in your Visual Studio Projects to the supported...
Read more >
Live Testing not working with NUnit - visual studio
When I turn on Live Testing my tests show "Excluded from live unit testing". This only happens if I use NUnit, using MSTest...
Read more >
How to get Visual Studio 2017 Live Unit Testing working ...
I recently attempted to get it working on a large project that had lots of NUnit tests. It's not too difficult, but there...
Read more >
Live Unit testing ignores my tests when I use NUnit test cases
I am using Visual Studio 2017 Enterprise 15.7.5 and I am facing a problem with the Live Unit Testing feature. I am using...
Read more >
Visual Studio Live Unit Testing: New to Visual Studio 2017
NUnit is perhaps the most popular testing tool for C#/.NET developers. Visual Studio Live Unit Testing can also work with xUnit and MSTest,...
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