Filtering from the CLI using /TestCaseFilter is not supported on extensions to TestPropertyAttribute
Here is an example of an extention to TestPropertyAttribute (RFC):
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MSTestV2Ex;
namespace MSTestV2Ex
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public class SmokeTest : TestPropertyAttribute
{
public SmokeTest()
: base("SmokeTest", null)
{
}
}
}
namespace UnitTestProject20
{
[TestClass]
public class UnitTest1
{
[TestMethod]
[SmokeTest]
public void TestMethod1()
{
}
[TestMethod]
public void TestMethod2()
{
}
}
}
Filtering and Grouping from within the Visual Studio IDE’s TestExplorer works.
However, filtering using the /TestCaseFilter switch on the CLI is not working.
It ought to be supported in a manner similar to how I am able to filter on TestProperty.
Here is where we have a list of supported properties today
@engyebrahim Can you double check that your PR also fixes this case?
@Evangelink it's not working, I'm debugging it
https://learn.microsoft.com/en-us/dotnet/core/testing/selective-unit-tests?pivots=mstest#:~:text=dotnet%20test%20%2D%2Dfilter%20Method
--filter SmokeTest as for the link the default if user filtered value without key will be filtered by fullyQualifiedName
and --filter SmokeTest=null it's not valid filter
by the new fix here https://github.com/microsoft/testfx/pull/3015 you can filter like that but you have to add a value to the TestProperty e.g. base("SmokeTest", "test")