Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-02

New stylesheet for fpcunit xml reports

14 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys
to Vincent Snijders

Ok, I'll bite.. ;-)

I spoke to Dean the other day and he mentioned a new update for FPCUnit will be sumbitted shortly. I didn't want to start on the new XSLT stylesheet before I know what format the XML is in.

Dean, if you can confirm that the new xml format with nested test suits are still as is, then I'll go ahead and modify the XSLT file.

Regards,
- Graeme -

Vincent Snijders wrote 17 lines
Hi, Dean Zobec created a new xmlreportwriter for fpcunit. Among others it supports nested test suites. Does anybody have a stylesheet for showing such a report. Maybe somebody is willing to create one. Examples of the old xml format+ style sheet (slightly modified): http://www.hu.freepascal.org/lazarus/testresults/monitor.xml Example of the new xml format: http://www.hu.freepascal.org/lazarus/testresults/results.xml Vincent _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Graeme Geldenhuys There's no place like S34° 03.168' E018° 49.342'
Dean Zobec
to Graeme Geldenhuys

Graeme,

Show quoted text 6 lines
I spoke to Dean the other day and he mentioned a new update for FPCUnit will be sumbitted shortly. I didn't want to start on the new XSLT stylesheet before I know what format the XML is in. Dean, if you can confirm that the new xml format with nested test suits are still as is, then I'll go ahead and modify the XSLT file.

Vincent produced the new results.xml example with the new report writer:

http://www.hu.freepascal.org/lazarus/testresults/results.xml (he already added the missing xsl tag )

The new writer is this:
http://www.freepascal.org/cgi-bin/viewcvs.cgi/trunk/fcl/fpcunit/xmltestreport.pp?rev=6311&view=markup

There's a new structure for the fpcunit reports, descending from TCustomResultsWriter.
There are two other report writers for text and latex output (you can find an example of the two other output formats in fpcunit/example_output directory, the pdf is produced using pdflatex from the latex output).
Note that we moved the essential fpcunit units to fcl/inc, the reports and other utils remain in the fpcunit directory.

Ciao, Dean

Show quoted text 32 lines
Regards, - Graeme - On 2/3/07, Vincent Snijders wrote: > Hi, > > Dean Zobec created a new xmlreportwriter for fpcunit. Among others it > supports nested test suites. Does anybody have a stylesheet for showing > such a report. Maybe somebody is willing to create one. > > Examples of the old xml format+ style sheet (slightly modified): > http://www.hu.freepascal.org/lazarus/testresults/monitor.xml > > Example of the new xml format: > http://www.hu.freepascal.org/lazarus/testresults/results.xml > > Vincent > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > -- Graeme Geldenhuys There's no place like S34° 03.168' E018° 49.342' _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Dean Zobec
to Graeme Geldenhuys: Ok, I'll bite.. ;-) I spoke to Dean the other day and he mentioned a new update for…

Graeme,

Show quoted text 8 lines
Ok, I'll bite.. ;-) I spoke to Dean the other day and he mentioned a new update for FPCUnit will be sumbitted shortly. I didn't want to start on the new XSLT stylesheet before I know what format the XML is in. Dean, if you can confirm that the new xml format with nested test suits are still as is, then I'll go ahead and modify the XSLT file.

I think a treeview layout is a way to go. Googling around I've found a link to a nice article,
hope it's of any help:
http://rollerjm.free.fr/pro/Treeview/Treeview.html

Regards,
Dean

Graeme Geldenhuys
to Vincent Snijders: Dean Zobec created a new xmlreportwriter for fpcunit. Among others it supports nested…

Hi Vincent,

I'm almost done with the new stylesheet. I've been testing it with the new xml format sample you mentioned in you email. How did you generate that? I wanted to test the new stylesheet against the tiOPF project, but my xml format is different (old format). I've got the latest FPC 2.1.1 from svn and my FPCUnit results are not in that xml format. Have you applied a patch to your local FPCUnit that is not yet in FPC 2.1.1 (subversion)?

Regards,
- Graeme -

Vincent Snijders wrote 17 lines
Hi, Dean Zobec created a new xmlreportwriter for fpcunit. Among others it supports nested test suites. Does anybody have a stylesheet for showing such a report. Maybe somebody is willing to create one. Examples of the old xml format+ style sheet (slightly modified): http://www.hu.freepascal.org/lazarus/testresults/monitor.xml Example of the new xml format: http://www.hu.freepascal.org/lazarus/testresults/results.xml Vincent _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Graeme Geldenhuys There's no place like S34° 03.168' E018° 49.342'
Vincent Snijders
to Graeme Geldenhuys
Graeme Geldenhuys wrote
Hi Vincent, I'm almost done with the new stylesheet.

Nice \0/

I've been testing it with

Show quoted text 6 lines
the new xml format sample you mentioned in you email. How did you generate that? I wanted to test the new stylesheet against the tiOPF project, but my xml format is different (old format). I've got the latest FPC 2.1.1 from svn and my FPCUnit results are not in that xml format. Have you applied a patch to your local FPCUnit that is not yet in FPC 2.1.1 (subversion)?

No, I used unmodified fpc and the lazarus changes (a modified console test runner) are in svn too.

You can get the results by compiling lazarus with fpc 2.1.1 and make sure the used compiler is in the environment

(Assuming linux path seperator, follow the next steps) Go to the lazarus/test directory.
../lazbuild runtests.lpi
./runtests -a -p --file=results.xml

Vincent

Graeme Geldenhuys
to Vincent Snijders
Vincent Snijders wrote
No, I used unmodified fpc and the lazarus changes (a modified console test runner) are in svn too.

How sure are you? :-) I followed your instructions and this is the xml 'runtests' generated.

---------------------------------
<?xml version="1.0"?>

<TestResults>

<!-- Generated using FPCUnit on 2007-02-08 16:58:31-->

<TestListing>

<TestSuite Name="Examples"/>

<TestSuite Name="address_book/addrbook.lpi">

<Test Name="address_book/addrbook.lpi.TestCompile">

<ElapsedTime>00:00:04.535</ElapsedTime>

</Test>

</TestSuite>

<TestSuite Name="anchordocking/docking1.lpi">

<Test Name="anchordocking/docking1.lpi.TestCompile">

<ElapsedTime>00:00:03.458</ElapsedTime>

</Test>

</TestSuite>

<TestSuite Name="autosize/childsizinglayout/childsizinglayout.lpi">

<Test Name="autosize/childsizinglayout/childsizinglayout.lpi.TestCompile">

<ElapsedTime>00:00:05.652</ElapsedTime>

</Test>

</TestSuite>
....snip.....
----------------------------------

You can get the results by compiling lazarus with fpc 2.1.1 and make sure the used compiler is in the environment

I always work with FPC 2.1.1 and latest Lazarus (svn). I get a update once a week for both projects. I also did a 'svn status' in the fpc/src/fcl/fpcunit directory to be sure I don't have a modified set of files, which I don't.

(Assuming linux path seperator, follow the next steps) Go to the lazarus/test directory. ../lazbuild runtests.lpi ./runtests -a -p --file=results.xml

I tried the 'runtestsgui' as well, and it generated the same xml as show above. I remember Dean posted to a select few a preliminary set of code changes for us to review, and mentioned in that post about a new feature of nested test suites. I double checked, those changes were never committed to SubVersion.

My daily build server for tiOPF's unit tests also run on the latest FPC and Lazarus an it's xml is also in the old format (as show above).

http://opensoft.homeip.net/tiopf/fpcunit/results.xml http://opensoft.homeip.net/tiopf/fpcunit/index.html

Graeme Geldenhuys There's no place like S34° 03.168' E018° 49.342'
Vincent Snijders
to Graeme Geldenhuys
Graeme Geldenhuys wrote 8 lines
On 2/8/07, Vincent Snijders wrote: > > No, I used unmodified fpc and the lazarus changes (a modified console > test runner) > are in svn too. How sure are you? :-) I followed your instructions and this is the xml 'runtests' generated.

95 % sure.

Lazarus changes:
r10573

Fpc changes:
r6190.

Show quoted text 18 lines
> > You can get the results by compiling lazarus with fpc 2.1.1 and make > sure the used > compiler is in the environment I always work with FPC 2.1.1 and latest Lazarus (svn). I get a update once a week for both projects. I also did a 'svn status' in the fpc/src/fcl/fpcunit directory to be sure I don't have a modified set of files, which I don't. > (Assuming linux path seperator, follow the next steps) > Go to the lazarus/test directory. > ../lazbuild runtests.lpi > ./runtests -a -p --file=results.xml I tried the 'runtestsgui' as well, and it generated the same xml as show above.

True the gui test runner still uses TXMLResultsWriter from xmlreporter unit. The lazarus console testrunner uses the TXMLResultsWriter from the xmltestreport unit.

I remember Dean posted to a select few a preliminary set of code changes for us to review, and mentioned in that post about a new feature of nested test suites. I double checked, those changes were never committed to SubVersion.

Not even in r6190?

Vincent

Graeme Geldenhuys
to Vincent Snijders
Vincent Snijders wrote
True the gui test runner still uses TXMLResultsWriter from xmlreporter unit. The lazarus console testrunner uses the TXMLResultsWriter from the xmltestreport unit.

Ok, no idea what happened!! I removed the IFDEF VER2_0 and made sure the second set of units are included.

I then got a error in line 214 and had to comment it, to get the console test to compile. It said the .Document property doesn't exist. I double checked the TXMLResultsWriter and the TCustomResultsWriter and I don't have a Document property. I would guess I need to create a Document property in TXMLResultsWriter and let it read the FDoc private variable. We better create a patch for this.

//      ExtendXmlDocument(TXMLResultsWriter(ResultsWriter).Document);

Anyway, after getting 'runtests' compiled, it now generates the new xml format. :-) I guess my daily build server for tiOPF is also referring to the 'xmlreporter' unit instead of the 'xmltestreport' unit.

Graeme Geldenhuys There's no place like S34° 03.168' E018° 49.342'
Vincent Snijders
to Graeme Geldenhuys
Graeme Geldenhuys wrote 16 lines
On 2/9/07, Vincent Snijders wrote: > True the gui test runner still uses TXMLResultsWriter from xmlreporter > unit. The > lazarus console testrunner uses the TXMLResultsWriter from the > xmltestreport unit. Ok, no idea what happened!! I removed the IFDEF VER2_0 and made sure the second set of units are included. I then got a error in line 214 and had to comment it, to get the console test to compile. It said the .Document property doesn't exist. I double checked the TXMLResultsWriter and the TCustomResultsWriter and I don't have a Document property. I would guess I need to create a Document property in TXMLResultsWriter and let it read the FDoc private variable. We better create a patch for this.

Or update to r6311 of fpc.

Vincent

Graeme Geldenhuys
to Vincent Snijders
Vincent Snijders wrote
> let it read the FDoc private variable. We better create a patch for > this. Or update to r6311 of fpc.

Ah. :) I'm on r6290.

Graeme Geldenhuys There's no place like S34° 03.168' E018° 49.342'
Vincent Snijders
to Graeme Geldenhuys
Graeme Geldenhuys wrote 7 lines
On 2/9/07, Vincent Snijders wrote: > > let it read the FDoc private variable. We better create a patch for > > this. > > Or update to r6311 of fpc. Ah. :) I'm on r6290.

That is more than a week old. I thought you updated each Monday...

Vincent

Graeme Geldenhuys
to Vincent Snijders
Vincent Snijders wrote 6 lines
>> Or update to r6311 of fpc. > > Ah. :) I'm on r6290. That is more than a week old. I thought you updated each Monday...

It's a week ago today, 2nd Feb... :-)

Graeme Geldenhuys There's no place like S34° 03.168' E018° 49.342'