If you have requests to enhance/improve the XML output of FPCUnit, I'm currently thinking about adding some extra information:
- OS (win32,linux,solaris... taken from e.g. compiler)
- CPU (likewise taken from compiler)
- revision number/code version (handy for identifying regressions)
- some optional comment field for the test application to use
BTW, there apparently are 2 XML formats, the original one and one that gives Dunit/Junit like output - I'm talking about the latter. See e.g. the dbtestframework_gui.lpi database test, run it and click on Results XML.
I would like to get output something like this:
Edit: adapted layout a bit to follow DUnit2:
http://members.optusnet.com.au/mcnabp/Projects/DUnit2/DUnit2Test.xml<?xml version="1.0" encoding="utf-8"?>
<TestResults>
<!-- Generated using FPCUnit on 2012-10-16 16:18:46-->
<TestListing>
<TestProject Name="dbtestframework.exe/oracle">
<RevisionID="22707"/> <!-- could be svn revision id, internal program version, git version, , even build dates in YYYYMMDDHHNNSS form etc, anything to identify regressions -->
<OS="win32"/>
<CPU="x86"/>
<Comment="BigChimp: normally we'd expect testproject name to be the application name; however with dbtestframework, the database connector is a variable that determines what tests are run and therefore is important. I don't think it needs to be output as a separate variable. Do you?"/>
<TestSuite Name="" ElapsedTime="00:00:00.732" NumberOfErrors="78" NumberOfFailures="0" NumberOfRunTests="80" NumberOfIgnoredTests="0">
<TestSuite Name="TTestBasics" ElapsedTime="00:00:00.008" NumberOfErrors="0" NumberOfFailures="0" NumberOfRunTests="7" NumberOfIgnoredTests="0">
<Test Name="TestParseSQL" Result="OK" ElapsedTime="00:00:00.002"/>
<Test Name="TestInitFielddefsFromFields" Result="OK" ElapsedTime="00:00:00.001"/>
<Test Name="TestDoubleFieldDef" Result="OK" ElapsedTime="00:00:00.000"/>
<Test Name="TestFieldDefWithoutDS" Result="OK" ElapsedTime="00:00:00.000"/>
<Test Name="TestGetParamList" Result="OK" ElapsedTime="00:00:00.001"/>
<Test Name="TestGetFieldList" Result="OK" ElapsedTime="00:00:00.000"/>
<Test Name="TestExtractFieldName" Result="OK" ElapsedTime="00:00:00.000"/>
</TestSuite>
<TestSuite Name="TTestFieldTypes" ElapsedTime="00:00:00.688" NumberOfErrors="73" NumberOfFailures="0" NumberOfRunTests="73" NumberOfIgnoredTests="0">
<Test Name="TestEmptyUpdateQuery" Result="Error" ElapsedTime="00:00:00.022">
<Message>TTestFieldTypes.TestEmptyUpdateQuery: Can not load SQLite client library "sqlite3.dll". Check your installation.</Message>
<ExceptionClass>EInOutError</ExceptionClass>
<ExceptionMessage>[SETUP] Can not load SQLite client library "sqlite3.dll". Check your installation.</ExceptionMessage>
<SourceUnitName></SourceUnitName>
<LineNumber>0</LineNumber>
<FailedMethodName></FailedMethodName>
</Test>
....
</TestSuite>
</TestProject>
</TestListing>
<NumberOfRunTests>80</NumberOfRunTests>
<NumberOfErrors>78</NumberOfErrors>
<NumberOfFailures>0</NumberOfFailures>
<NumberOfIgnoredTests>0</NumberOfIgnoredTests>
<TotalElapsedTime>00:00:00.737</TotalElapsedTime>
<DateTimeRan>2012-10-16 16:18:47</DateTimeRan>
</TestResults>
Any more suggestions that could be useful when thinking about adding extra information?
Thanks,
BigChimp