How to Fix this C# issue No test matches the given testcase filter `FullyQualifiedName =
You don't use a Main
method to run a test.
Instead, put a [TestMethod]
annotation on the methods you want to run as tests. The test runner will take care of creating an instance of your test class and calling these methods.
Methods with the [TestMethod]
annotation must be public
and void
, must not be static
and should take no arguments. Even if you put [TestMethod]
on your Main
method, the test would likely not run.
Here's what your UnitTest1
class should look like:
namespace SignUpPageAssignment
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
Automation automation = new Automation();
automation.TestMethod1();
}
}
}
Have resolved issue with "No test matches the given testcase filter FullyQualifiedName" by running updates to latest version for next packages:
Microsoft.NET.Test.Sdk
MSTest.TestAdapter
MSTest.TestFramework
My case is - an old project with NUnit 2.5 opened in a new VS2019 gives the same error.
As NUnit 2.x does not included into VS2019 by default - you need to install it.
Go to Menu -> Extensions -> ManageExtensions
then search for "NUnit 2 Test Adapter"
then install it.
That helped me.