diff --git a/src/JUnit.Xml.TestLogger/JunitXmlSerializer.cs b/src/JUnit.Xml.TestLogger/JunitXmlSerializer.cs index bf8be41..28d1a7b 100644 --- a/src/JUnit.Xml.TestLogger/JunitXmlSerializer.cs +++ b/src/JUnit.Xml.TestLogger/JunitXmlSerializer.cs @@ -238,7 +238,7 @@ private XElement CreateTestSuiteElement(List results, TestRunCon element.SetAttributeValue("skipped", results.Where(x => x.Outcome == TestOutcome.Skipped).Count()); element.SetAttributeValue("failures", results.Where(x => x.Outcome == TestOutcome.Failed).Count()); element.SetAttributeValue("errors", 0); // looks like this isn't supported by .net? - element.SetAttributeValue("time", results.Sum(x => x.Duration.TotalSeconds)); + element.SetAttributeValue("time", results.Sum(x => x.Duration.TotalSeconds).ToString(CultureInfo.InvariantCulture)); element.SetAttributeValue("timestamp", runConfiguration.StartTime.ToString("s")); element.SetAttributeValue("hostname", Environment.MachineName); element.SetAttributeValue("id", 0); // we never output multiple, so this is always zero. @@ -272,7 +272,7 @@ private XElement CreateTestCaseElement(TestResultInfo result) // seconds should be low enough it won't interfere with anyone monitoring test duration. testcaseElement.SetAttributeValue( "time", - Math.Max(0.0000001f, result.Duration.TotalSeconds).ToString("0.0000000")); + Math.Max(0.0000001f, result.Duration.TotalSeconds).ToString("0.0000000", CultureInfo.InvariantCulture)); if (result.Outcome == TestOutcome.Failed) {