Invalid characters in test name breaks test runner
See original GitHub issue-
versions: NUnit 3.0 and NUnit Adapter 3.10.0.21
-
Visual Studio Professional version 15.8.5
-
.NET framework is 4.6.1
-
When a test with a custom name has invalid characters in that name (in this case, ‘&’), the nunit adapter throws an error and the tests are removed from the window
-
Only appears to happen when you select a group of tests
-
Doesn’t appear to happen on other machines
public class Class1
{
[TestCaseSource("testcases")]
public void foo()
{
}
public static IEnumerable<TestCaseData> testcases { get; } = new[] { new TestCaseData().SetName("&") };
}
test is visible after building the solution
chose to run selected tests on a group of tests
test is not run and disappears from the window
Error message:
[9/27/2018 11:47:55 AM Error] An exception occurred while invoking executor 'executor://nunit3testexecutor/': Incorrect format for TestCaseFilter Error: Missing operand. Specify the correct format and try again. Note that the incorrect format can lead to no test getting executed.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Test cases to test 'name without special characters'
If you enter a special character into an input field name and it isn't filtered out, does it break the name field used...
Read more >Tower: What is causing "[WARNING]: Invalid characters ...
This warning appears when you are using dashes in your inventory file when you declaring your group names. For instance if your inventory ......
Read more >Allow spaces or special characters as a test name ...
states, "The test name may not contain spaces, quotes, or other characters special in CMake syntax." However, the ability to have such special...
Read more >How to Automate Field Validation Special Characters Testing
The example of the test for Field Validation Special Characters in testRigor is ... check that page does not contain "First name invalid"....
Read more >SyntaxError: illegal character - JavaScript - MDN Web Docs
The JavaScript exception "illegal character" occurs when there is an invalid or unexpected token that doesn't belong at this position in the code....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I have the same problem - just me and non of my colleges. In my case the error caused by character ‘=’. Replacing ‘=’ characted with ‘equals to’ resolved the problem.
Excellent, thanks. That will increase the priority then, especially since
&is used in URI query params as you mentioned.