nunit: NUnit cannot find tests after upgrading to Visual Studio 15.8
Hi,
I updated Visual studio Enterprise 2017 to version 15.8.0 and it fails to discover all tests inside Unit Test project (.NET Framework 4.6.1). It discovers tests for .NET Standard 2.0, but fails for .NET Framework 4.6.1. I can see all tests in Test Explorer, but when I try to run them I get this output:
[2018-08-16 11:58:45 Informational] ------ Run test started ------
[2018-08-16 11:58:46 Warning] No test matches the given testcase filter `FullyQualifiedName=WebFormsApplication.Tests.UnitTest1.TestMethod1` in myPath\WebFormsApplication.Tests\bin\Debug\WebFormsApplication.Tests.dll
[2018-08-16 11:58:46 Informational] ========== Run test finished: 0 run (0:00:01,0001) ==========
Replication steps:
- Create WebForms application targeting .NET Framework 4.6.1.
- Create Unit Test project targeting .NET Framework 4.6.1
- Install NUnit 3.10.1 nuget package in Unit Test Project
- Create test inside Unit Test project:
[TestFixture]
public class UnitTest1
{
[Test]
public void TestMethod1()
{
Assert.Pass();
}
}
- Rebuild
This test will be discovered in Test Explorer but trying to run this will result in above output.
I’m using NUnit 3 Test Adapter 3.10.0.0 and NUnit 3.10.1 nuget package
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 4
- Comments: 18 (7 by maintainers)
but I found I can solve this by downgrading NUnit to version 3.10.0
Same here as @miroslav-peterka .
Was using NUnit3TestAdapter 3.10.0 and NUnit 3.11.0, and got the “No test matches the given testcase filter” error message. After downgrading to NUnit 3.10.0 I can run unit tests again.
Issue is solved by removing references to
Microsoft.VisualStudio.TestPlatform.TestFramework Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions