[LDTP-Dev] Stylesheet for log generated in LDTP!!
J Premkumar
jpremkumar at novell.com
Sun Oct 2 13:35:53 PDT 2005
Hi All,
I have written a XSL(eXtensible StyLesheet Language) code to transform
the log (in xml format) generated in LDTP into a more readable html
format.
What can it do for you ....
It transforms the log generated when executing scripts using
LDTP into a html file in the following format.
Group Name: <name of the group>
---------------------------------------------------------------------
Test Name | Script Name | Status | Error (s)
----------------------------------------------------------------------
Test names of failed test cases whose status value is '0' are
displayed with a red background colour.
How to use this ....
I am investigating to find an easier way but for time being
please follow the given steps to transform the log into html document ;)
* copy the attached log2html.xsl file
* install libxslt library if it is not installed already
* use the following command to generate the html file
$ xsltproc -o<html-file-name>
$copied_path/log2html.xsl <log-file-name>
Alternatively you can also use other xslt processors available
to transform the log file using this xsl code.
What are the limitations ....
* This xsl code handles logs with' group' tag in the first
level only. Nested groups have not been considered currently.
* The transformation process is bit of painstaking activity now
but can be overcome by including <?xml-stylesheet>
directly in the log file so that when displayed in a
browser, the stylesheet gets applied automatcally. Currently I am
facing certain issues in this method, I will update you all
once I resolve it.
Though this xsl code is very primitive and the format generated may not
be appealing for all ;), I think we can you this to generate more
attractive log reports in any required format. Please give your comments
on this xsl code and its output, so that we can make one default
stylesheet for the logs generated using LDTP. Many can use this as
reference and transform the generated log into other formats based on
their needs.
I have attached the xsl code as well as a sample log file. Please try
them and give your valuable comments.
Thanks
Premkumar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log2html.xsl
Type: application/octet-stream
Size: 1283 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/ldtp-dev/attachments/20051002/a858ee2b/log2html.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample-log.xml
Type: application/octet-stream
Size: 583 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/ldtp-dev/attachments/20051002/a858ee2b/sample-log.obj
More information about the Ldtp-dev
mailing list