This block of code needs to handle the skipped case and emit a skipped element. Currently anything not Failed is considered successful.
|
private static XElement CreateTestCaseElement(TestResultInfo result) |
|
{ |
|
var element = new XElement("testcase", |
|
new XAttribute("classname", result.Type), |
|
new XAttribute("name", result.Name), |
|
new XAttribute("time", result.Time.TotalSeconds.ToString("N7", CultureInfo.InvariantCulture))); |
|
|
|
if (result.Outcome == TestOutcome.Failed) |
|
{ |
|
var failure = new XElement("error"); |
|
failure.SetAttributeValue("message", RemoveInvalidXmlChar(result.ErrorMessage)); |
|
failure.Value = RemoveInvalidXmlChar(result.ErrorStackTrace); |
|
|
|
element.Add(failure); |
|
} |
|
|
|
return element; |
|
} |
some speculative code that might fix this:
if (result.Outcome == TestOutcome.Skipped)
{
var skipped = new XElement("skipped");
element.Add(skipped);
}
This block of code needs to handle the skipped case and emit a
skippedelement. Currently anything notFailedis considered successful.JUnitTestLogger/src/JunitTestLogger/JUnitXmlTestLogger.cs
Lines 370 to 387 in 25ae7b4
some speculative code that might fix this: