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
Describe the bug
After converting to cobertura xml file from .coverage binary file, the parsing fails within the cobertura parser. I don't see any reason this shouldn't work given this looks like a valid cobertura xml file to me.
NOTE This file can be processed by report generator and work correctly.
Expected behaviour
File to be parsed successfully and coverage gutters to appear.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: Windows via WSL
Extension Version: v2.11.1
VSCode Version: 1.86.2
Additional context
Stack Trace:
[1709159241884][coverageservice]: READY
[1709159243317][coverageservice]: LOADING
[1709159244720][coverageservice]: Loading 1 file(s)
[1709159244720][coverageservice]: <REDACTED>/code_coverage.xml
[1709159244722][coverageservice]: Loaded 1 data file(s)
[1709159245196][coverageparser][cobertura-parse]: Error: filename: <REDACTED>/code_coverage.xml Cannot read properties of undefined (reading '0')
[1709159245196][coverageparser][cobertura-parse]: Stacktrace: TypeError: filename: /home/gthomas/repos/Service.HealthDeidentification/code_coverage.xml Cannot read properties of undefined (reading '0')
at unpackage (/home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/node_modules/cobertura-parse/source/index.js:75:34)
at /home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/node_modules/cobertura-parse/source/index.js:137:22
at Parser.<anonymous> (/home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/node_modules/xml2js/lib/parser.js:303:18)
at Parser.emit (node:events:514:28)
at SAXParser.onclosetag (/home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/node_modules/xml2js/lib/parser.js:261:26)
at emit (/home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/node_modules/sax/lib/sax.js:624:35)
at emitNode (/home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/node_modules/sax/lib/sax.js:629:5)
at closeTag (/home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/node_modules/sax/lib/sax.js:889:7)
at SAXParser.write (/home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/node_modules/sax/lib/sax.js:1436:13)
at Parser.exports.Parser.Parser.parseString (/home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/node_modules/xml2js/lib/parser.js:322:31)
at Parser.parseString (/home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/node_modules/xml2js/lib/parser.js:5:59)
at exports.parseString (/home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/node_modules/xml2js/lib/parser.js:354:19)
at parse.parseContent (/home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/node_modules/cobertura-parse/source/index.js:130:5)
at /home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/out/src/files/coverageparser.js:72:52
at new Promise (<anonymous>)
at CoverageParser.xmlExtractCobertura (/home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/out/src/files/coverageparser.js:63:16)
at CoverageParser.<anonymous> (/home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/out/src/files/coverageparser.js:36:47)
at Generator.next (<anonymous>)
at /home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/node_modules/tslib/tslib.js:118:75
at new Promise (<anonymous>)
at __awaiter (/home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/node_modules/tslib/tslib.js:114:16)
at CoverageParser.filesToSections (/home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/out/src/files/coverageparser.js:19:38)
at CoverageService.<anonymous> (/home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/out/src/coverage-system/coverageservice.js:84:60)
at Generator.next (<anonymous>)
at fulfilled (/home/gthomas/.vscode-server/extensions/ryanluker.vscode-coverage-gutters-2.11.1/node_modules/tslib/tslib.js:115:62)
The text was updated successfully, but these errors were encountered:
Describe the bug
After converting to cobertura xml file from .coverage binary file, the parsing fails within the cobertura parser. I don't see any reason this shouldn't work given this looks like a valid cobertura xml file to me.
To Reproduce
Steps to reproduce the behaviour:
<DataCollector friendlyName="Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0" assemblyQualifiedName="Microsoft.VisualStudio.Coverage.DynamicCoverageDataCollector, Microsoft.VisualStudio.TraceCollector, Culture=neutral">
dotnet-coverage merge -f cobertura -o $code_coverage_file_name $latest_file
Expected behaviour
File to be parsed successfully and coverage gutters to appear.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Windows via WSL
v2.11.1
1.86.2
Additional context
Stack Trace:
The text was updated successfully, but these errors were encountered: