You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test works as it should but the XML report generated by JUnit fails to be parsed by majority of XML parsers because these characters just go into the test case name. In the file target/surefire-reports/TEST-test.JsonParserTest.xml I can see:
I cannot copypaste it properly but there is actually a character with code 08 on the second line and 0A on the last. Each making XML invalid.
You can argue that it is is JUnit that does not do proper escaping when writing XML but it probably just does not expect test names (which used to be just method) names to contain anything like that.
After all, if your parameter is of type String I would expect it to go as a proper Java string into the test name - quoted and with every character that should be escaped in Java string to be escaped:
The testnames generated by JUnitParams do not escape special characters.
When these parameters
are fed into through
The test works as it should but the XML report generated by JUnit fails to be parsed by majority of XML parsers because these characters just go into the test case name. In the file
target/surefire-reports/TEST-test.JsonParserTest.xml
I can see:I cannot copypaste it properly but there is actually a character with code 08 on the second line and 0A on the last. Each making XML invalid.
You can argue that it is is JUnit that does not do proper escaping when writing XML but it probably just does not expect test names (which used to be just method) names to contain anything like that.
After all, if your parameter is of type
String
I would expect it to go as a proper Java string into the test name - quoted and with every character that should be escaped in Java string to be escaped:Cheers
PS: reproduced with 1.1.1
The text was updated successfully, but these errors were encountered: