nunit.testlogger
nunit.testlogger copied to clipboard
Log message to console: "Unable to parse the test name"
The following log messages are produced:
2021-11-22T23:55:39.7872697Z Xml Logger: Unable to parse the test name 'NetworkPrimitives.Tests.Common.CharExtensionTests.TestIsHex('"',False)' into a namespace type and method. Using Namespace='UnknownNamespace', Type='UnknownType' and Method='NetworkPrimitives.Tests.Common.CharExtensionTests.TestIsHex('"',False)'
2021-11-22T23:55:39.7882339Z Xml Logger: Unable to parse the test name 'NetworkPrimitives.Tests.Common.CharExtensionTests.TestIsHex('(',False)' into a namespace type and method. Using Namespace='UnknownNamespace', Type='UnknownType' and Method='NetworkPrimitives.Tests.Common.CharExtensionTests.TestIsHex('(',False)'
2021-11-22T23:55:39.7889575Z Xml Logger: Unable to parse the test name 'NetworkPrimitives.Tests.Common.CharExtensionTests.TestIsHex(')',False)' into a namespace type and method. Using Namespace='UnknownNamespace', Type='UnknownType' and Method='NetworkPrimitives.Tests.Common.CharExtensionTests.TestIsHex(')',False)'
I suspect it has to do with the usage of (
, )
, and "
- The test method that is producing the log message
- GitHub Actions logs
- The log messages are also produced on a local build (not using GitHub actions)
- The
dotnet test
command line arguments that are being used are located here - There are two test projects
- The first
.csproj
file is located here - The second
.csproj
file is located here - Both
.csproj
files are importing theDirectory.Build.props
file located here.
- The first
@binarycow Thanks for letting us know. I agree its probably the chars. I will take a look at it soon.
@Siphonophora - Want me to leave my branch/PR (on my repo) open, so you can replicate/whatever? Or, am I free to close?
@binarycow Fine to close it. I have a fix on the core testlogger library for this, waiting on a code review.
@binarycow If you have time to test it, we have an updated version of this logger here: https://ci.appveyor.com/project/spekt/nunit-testlogger/builds/41685956/artifacts
Hello, I came across this as I was looking to upgrade this package (related to: https://github.com/spekt/testlogger/issues/28).
I checked out the updated version there. Tests that have apostrophes in the test name are still unable to be parsed:
[TestCase("example1", TestName = "Customer's name")]
public void MyTest(
string a
) { ... }
We've run into this too. For a huge number of test cases like this one:
Xml Logger: Unable to parse the test name 'Namespace.Fixture.ValidSpecialCharacters("%",(file://c:\foo\ba{0}r\asdf, file:///c:/foo/ba{0}r/asdf))' into a namespace type and method. Using Namespace='UnknownNamespace' , Type='UnknownType' and Method='Namespace.Fixture.ValidSpecialCharacters("%",(file://c:\foo\ba{0}r\asdf, file:///c:/foo/ba{0}r/asdf))'
Potential fix in https://github.com/spekt/nunit.testlogger/pull/93
Fix is released in 3.0.127.