question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

  • repro: https://github.com/laura-campbell/nunit3bug

public class Class1
{
        [TestCaseSource("testcases")]
        public void foo()
        {
        }
        public static IEnumerable<TestCaseData> testcases { get; } = new[] { new TestCaseData().SetName("&") };
}

image test is visible after building the solution

image chose to run selected tests on a group of tests

image 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:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
Macht59commented, Aug 1, 2019

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.

1reaction
rprousecommented, Sep 27, 2018

Excellent, thanks. That will increase the priority then, especially since & is used in URI query params as you mentioned.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found