nunit / nunit3-vs-adapter

NUnit 3.0 Visual Studio test adapter for use under VS 2012 or later
https://nunit.org
MIT License
205 stars 106 forks source link

Test Explorer Updating Testcase path Of non english character this cases test discovery and test run #1189

Closed AshuK2297 closed 4 months ago

AshuK2297 commented 4 months ago

When reporting a bug, please provide the following information to speed up triage:

If We Can See File Path Provided is given below [TestCase(@"2013\Files\mô hình hoàn thành\đường ống dẫn bi 1.SLDPRT")]

And Test Explorer after reading that adding \u009dng in It That Why test is not able to run from Visual Studio

Sw3dSketch("2013\Files\mô hình hoàn thành\Ä‘Æ°á»\u009dng ống dẫn bi 1.SLDPRT")

For further investigation, I have checked the file Unicode also but it is By Default UTF-8.

Not able to remove that \u009dng.

OsirisTerje commented 4 months ago

The u009 is a Horisontal tab character. The folder is readable, but the filename seems weird to me. If the file name is correct, then it anyway confuses the FQN requirements of the Test Explorer. It may be some escaping routine somewhere in the chain that doesn't understand that filename. As this is vietnamese, it may be that some of the characters are mangled. I didnt know that vietnamese had the 'Æ' and 'Ä' characters, so those indicate something is mangled. Suggest you use the TestName property on the TestCase to set a better name for it, and then see if it works.

AshuK2297 commented 4 months ago

@OsirisTerje Using This below line of code I can run the test Thanks For the Solution. But Using this we are not able to see the file Path and Test name together in Test Explorer. [TestCase(@"2013\Files\mô hình hoàn thành\đường ống dẫn bi 1.SLDPRT",TestName= "Sw3dSketch #1")]

but Still Conversion of this Kind 'Æ' and 'Ä' characters, we can investigate why it converting if we have UTF-8 Conversion.

OsirisTerje commented 4 months ago

You can write out the path if you like using something like TestContext.Writeline(filepath); That way you can see it in the output.