{"action":"created","issue":{"url":"https://api.github.com/repos/nunit/nunit/issues/3064","repository_url":"https://api.github.com/repos/nunit/nunit","labels_url":"https://api.github.com/repos/nunit/nunit/issues/3064/labels{/name}","comments_url":"https://api.github.com/repos/nunit/nunit/issues/3064/comments","events_url":"https://api.github.com/repos/nunit/nunit/issues/3064/events","html_url":"https://github.com/nunit/nunit/pull/3064","id":369977257,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyNzY1ODA2","number":3064,"title":"Addresses issue 3063.","user":{"login":"MatthewBeardmore","id":808932,"node_id":"MDQ6VXNlcjgwODkzMg==","avatar_url":"https://avatars3.githubusercontent.com/u/808932?v=4","gravatar_id":"","url":"https://api.github.com/users/MatthewBeardmore","html_url":"https://github.com/MatthewBeardmore","followers_url":"https://api.github.com/users/MatthewBeardmore/followers","following_url":"https://api.github.com/users/MatthewBeardmore/following{/other_user}","gists_url":"https://api.github.com/users/MatthewBeardmore/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewBeardmore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewBeardmore/subscriptions","organizations_url":"https://api.github.com/users/MatthewBeardmore/orgs","repos_url":"https://api.github.com/users/MatthewBeardmore/repos","events_url":"https://api.github.com/users/MatthewBeardmore/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewBeardmore/received_events","type":"User","site_admin":false},"labels":[{"id":805813973,"node_id":"MDU6TGFiZWw4MDU4MTM5NzM=","url":"https://api.github.com/repos/nunit/nunit/labels/awaiting:contributor","name":"awaiting:contributor","color":"b60205","default":false},{"id":805814694,"node_id":"MDU6TGFiZWw4MDU4MTQ2OTQ=","url":"https://api.github.com/repos/nunit/nunit/labels/awaiting:review","name":"awaiting:review","color":"47e86a","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-10-15T02:38:36Z","updated_at":"2018-10-24T17:31:19Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/nunit/nunit/pulls/3064","html_url":"https://github.com/nunit/nunit/pull/3064","diff_url":"https://github.com/nunit/nunit/pull/3064.diff","patch_url":"https://github.com/nunit/nunit/pull/3064.patch"},"body":"Closes nunit/nunit3-vs-adapter#484 and #3063\r\n\r\nWhen NUnit VS adapter passes a test filter generated by VS into NUnit, the filter contains an invalid XML character (but valid UTF16 character) - for example, '\\x01'. When read into TestFilter.LoadXML, it throws an exception and the test can never be run. Even if the XML character is escaped in the VS test adapter, it would still fail in FullNameFilter, as that expects the unescaped UTF16 character at that time.\r\n\r\nWe will first need to either (enforce) escaping from any applications calling into NUnit programmatically, or do the escaping ourselves when we read in a string (in FrameworkController.RunTests) so that it always will be read in as valid XML. Secondly, we will need to address the FullNameFilter, and my two proposals are copied from the other issue below:\r\n\r\nMy proposals from the other issue are as follows:\r\n1: Unescape the characters that we escaped in the XML to make it load, so that FullNameFilter would match correctly.\r\n2. Escape all FullNameFilter options that come in to match what is able to be loaded from the XML.\r\n\r\nI think 2 is more feasible, as unescaping is a more difficult task and we know that the test filters will be coming in as XML (which will be escaped if they load properly), so the escaping in the filter will make it so that they will match between the two in (I believe) all cases.\r\n\r\n\r\nI implemented escaping all filter strings when they come in if they contain non XML compliant characters and proposal 2 for how to handle the full name filtering. The only concern I have at this time is that until the escaping is faster (from a separate pull request), this may take a hit on performance as the regex is not a fast operation."},"comment":{"url":"https://api.github.com/repos/nunit/nunit/issues/comments/432754176","html_url":"https://github.com/nunit/nunit/pull/3064#issuecomment-432754176","issue_url":"https://api.github.com/repos/nunit/nunit/issues/3064","id":432754176,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjc1NDE3Ng==","user":{"login":"jnm2","id":8040367,"node_id":"MDQ6VXNlcjgwNDAzNjc=","avatar_url":"https://avatars2.githubusercontent.com/u/8040367?v=4","gravatar_id":"","url":"https://api.github.com/users/jnm2","html_url":"https://github.com/jnm2","followers_url":"https://api.github.com/users/jnm2/followers","following_url":"https://api.github.com/users/jnm2/following{/other_user}","gists_url":"https://api.github.com/users/jnm2/gists{/gist_id}","starred_url":"https://api.github.com/users/jnm2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnm2/subscriptions","organizations_url":"https://api.github.com/users/jnm2/orgs","repos_url":"https://api.github.com/users/jnm2/repos","events_url":"https://api.github.com/users/jnm2/events{/privacy}","received_events_url":"https://api.github.com/users/jnm2/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T17:31:19Z","updated_at":"2018-10-24T17:31:19Z","author_association":"CONTRIBUTOR","body":"Here's the real culprit:\r\n\r\nhttps://github.com/nunit/nunit-console/blob/af89a437153955fb3aea0ea168965f596a6f3066/src/NUnitEngine/nunit.engine/Services/TestFilterBuilder.cs#L82-L90\r\n\r\nNUnit.Engine has an invalid XmlEscape implementation. There's also a low-hanging performance win to grab here too if we use XmlWriter instead of string.Replace five (should be at least thirty-seven) times."}}
{"actor":{"display_login":"jnm2"}}