An exception occurred while invoking executor 'executor://nunit3testexecutor/': Incorrect format for TestCaseFilter Error: Missing ')'.
See original GitHub issueENVIRONMENT
NUnit: 3.10.1 NUnit3TestAdapter: 3.10.0 Visual Studio: 15.9.2 .NET Platform: .NET Core 2.1
DESCRIPTION
When executing a category of tests, if a test is included in the list of tests that contains an opening parenthesis, but does not contain the closing parenthesis, the following error may occur, and the test run will fail:
An exception occurred while invoking executor ‘executor://nunit3testexecutor/’: Incorrect format for TestCaseFilter Error: Missing ‘)’. Specify the correct format and try again. Note that the incorrect format can lead to no test getting executed.
REPRODUCTION
This issue can only be reproduced when selecting a group of tests to run - selecting individual tests, or selecting ‘Run All’ will no reproduce the issue.
It appears that reproducing the issue requires there to be a test that includes an opening parenthesis but does not include a closing parenthesis, and a test that ends with the closing bracket character (‘]’).
You should be able to reproduce the issue by using the following test code:
public class TestNameRepro
{
#region TestCaseSource
protected static IEnumerable TestName_TestCases
{
get
{
// Adding a parenthesis to the end of this test name will stop the exception from throwing (e.g. $"TestName(...)")
yield return new TestCaseData(1).SetName($"TestName(...");
// Cannot be duplicated without a second test included that ends with a ']'
yield return new TestCaseData(2).SetName($"TestName(...)]");
}
}
#endregion
[Test, TestCaseSource(nameof(TestName_TestCases))]
public void TestName(int input)
{
// Irrelevant
}
}
Once built, categorize the test explorer using the ‘Class’ category selection, and select the test suite ‘TestNameRepro’ and click ‘Run Selected Tests’:

The ‘Tests’ output window should display the error mentioned above:
An exception occurred while invoking executor ‘executor://nunit3testexecutor/’: Incorrect format for TestCaseFilter Error: Missing ‘)’. Specify the correct format and try again. Note that the incorrect format can lead to no test getting executed.
Issue Analytics
- State:
- Created 4 years ago
- Comments:30 (14 by maintainers)

Top Related StackOverflow Question
As an update to this, I tested the fix with the 3.16.0-dev-01202 package and this Test is not run with the same error message as described in this issue.
If I however switch around the Types, then it will execute
[TestCase(typeof(IDummy<String, (String body, Dictionary<String, String> applicationData)>))]Summary: TestCase[Type<Tuple(), Type>] Error TestCase[Type<Type, Tuple()>] Executed
Happened to me on VS2022. Fixed it by removing the “{m}” modifier inside of the property TestName.