xray icon indicating copy to clipboard operation
xray copied to clipboard

The xunit top-level error value is incorrectly calculated.

Open rhdunn opened this issue 4 years ago • 0 comments

The line https://github.com/robwhitby/xray/blob/82379fef28971583767c616399826280f4cfdbc4/src/output/xunit.xsl#L17 has a bug calculating the total errors.

This is because an error:error element is added inside the xray:test[@result='error'] element, so the error gets double counted. Note: this is not an issue with the module processing as it only checks child elements, not all descendant elements.

The following count expression should fix the issue:

count(//(error:error[not(parent::xray:test)]|xray:test[@result='error']))

rhdunn avatar Jan 30 '21 08:01 rhdunn