Open ihancock opened 2 years ago
What version are you using? A recent version should have fixed some illegal Unicode in XML problems.
The version is 2.0.2 which I believe is the latest.
I believe that the problem arises because control characters are invalid in XML 1.0 but allowed in XML 1.1, see this wiki page and also this stackoverflow question
opened PR #39
I just ran into this as well as the azure devops report task is not willing to eat invalid xml, would be great if the PR of @dinwath could be merged
for reference: I quickly tested if moving the xml version to 1.1 would fix the issue I had in azure devops. Unfortunately it is not, seems that they do only support xml version 1.0. Not sure if that is something specifically on their end or something in the junit format.
for reference: I quickly tested if moving the xml version to 1.1 would fix the issue I had in azure devops. Unfortunately it is not, seems that they do only support xml version 1.0. Not sure if that is something specifically on their end or something in the junit format.
@lazytesting Experiencing same issue with Azure devops, were you able solve it?
I've tried to "clean up" outputted XML file with some regex magic like
sed -Er -i'.bak' 's,\[34m|\[90m|\[31m|\[31m|\[0m|-\]|\[-,,g' TEST-report.xml
Basically, remove any escape characters, but they are apparently not all. So looking for some better solution.
For us it was only 1 character which gave the problem and this task solved it:
- task: Bash@3
displayName: "Fix test report"
condition: always()
inputs:
targetType: 'inline'
script: "sed 's/[]//g' -i test-report.xml"
Our application uses Logger package which color codes log output. This introduces Unicode character code in the XML output which are not encoded into and XML entity.
See attached log file