|
@@ -18,10 +18,10 @@
|
|
|
|
|
|
|
|
|
Purpose:
|
|
|
- This unit contains a XML TestListener for use with the fpcUnit testing
|
|
|
- framework. It uses the XMLWrite unit, which is part of FPC, to generate
|
|
|
- the XML document. The benefit of using the XMLWrite unit, is that the
|
|
|
- data generated is valid XML, with resevered characters correctly escaped.
|
|
|
+ This unit contains an XML TestListener for use with the fpcUnit testing
|
|
|
+ framework. It uses the XMLWrite unit, which is part of FPC, to generate
|
|
|
+ the XML document. The benefit of using the XMLWrite unit is that the
|
|
|
+ data generated is valid XML, with reserved characters correctly escaped.
|
|
|
This allows the XML document to be further processed with XSLT etc without
|
|
|
any issues.
|
|
|
|
|
@@ -107,9 +107,12 @@ begin
|
|
|
n.AppendChild(FDoc.CreateTextNode(IntToStr(pTestResult.NumberOfIgnoredTests)));
|
|
|
lResults.AppendChild(n);
|
|
|
|
|
|
- n := FDoc.CreateElement('TotalElapsedTime');
|
|
|
- n.AppendChild(FDoc.CreateTextNode(FormatDateTime('hh:nn:ss.zzz', Now - pTestResult.StartingTime)));
|
|
|
- lResults.AppendChild(n);
|
|
|
+ if not(SkipTiming) then
|
|
|
+ begin
|
|
|
+ n := FDoc.CreateElement('TotalElapsedTime');
|
|
|
+ n.AppendChild(FDoc.CreateTextNode(FormatDateTime('hh:nn:ss.zzz', Now - pTestResult.StartingTime)));
|
|
|
+ lResults.AppendChild(n);
|
|
|
+ end;
|
|
|
|
|
|
{ Summary of ISO 8601 http://www.cl.cam.ac.uk/~mgk25/iso-time.html }
|
|
|
n := FDoc.CreateElement('DateTimeRan');
|
|
@@ -244,9 +247,12 @@ var
|
|
|
lNew: TDOMElement;
|
|
|
begin
|
|
|
n := FLastTestSuite.LastChild;
|
|
|
- lNew := FDoc.CreateElement('ElapsedTime');
|
|
|
- lNew.AppendChild(FDoc.CreateTextNode(FormatDateTime('hh:nn:ss.zzz', Now - FStartCrono)));
|
|
|
- n.AppendChild(lNew);
|
|
|
+ if not(SkipTiming) then
|
|
|
+ begin
|
|
|
+ lNew := FDoc.CreateElement('ElapsedTime');
|
|
|
+ lNew.AppendChild(FDoc.CreateTextNode(FormatDateTime('hh:nn:ss.zzz', Now - FStartCrono)));
|
|
|
+ n.AppendChild(lNew);
|
|
|
+ end;
|
|
|
end;
|
|
|
|
|
|
procedure TXMLResultsWriter.StartTestSuite(ATestSuite: TTestSuite);
|