Avatar of Yann Spöri
Author: Yann Spöri
28. February 2019

Creating custom HTML/XML/Junit reports

Via the run-log QF-Test provides a detailed log about the actions it executed during a test run. The overall results of this run-log can be summarized in other reports like the HTML/XML/Junit report.

A not well documented - but gladly used - feature is that it is possible to adapt/change the style/content of these reports to the own needs. Nevertheless, in order to do so, basic programming knowledges are inevitably needed.

The HTML/XML/JUnit-Reports are generated via an XSLT-Transformation. The therefore needed XSLT-Sheets are located in the directory <Path to the QF-Test Installation directory>\qftest\qftest-$(version)\report. Whenever you are creating your own XSLT-Transformation-Sheets, you may want to copy/move the content of this directory to <Path to the QF-Test Installation directory>\qftest\report. As the XSLT-Transformation-Sheets in the directory <Path to the QF-Test Installation directory>\qftest\report are preferred over the XSLT-Transformation-Sheets in the directory <Path to the QF-Test Installation directory>\qftest\qftest-$(version)\report, your modified XSLT-Sheets will then also be used by later QF-Test versions. However - as an disadvantage - whenever a new QF-Test version is coming out with any XSLT-Sheets improvements, you will not notice these improvements anymore.

Notes

  • The XSLT Identity Transformation may be used in order to get the original XML Document out of which the HTML/XML/JUnit-Reports are getting generated:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:template match="@*|node()">
   <xsl:copy>
     <xsl:apply-templates select="@*|node()"/>
   </xsl:copy>
 </xsl:template>
</xsl:stylesheet>

  • When generating an HTML report, it may be wanted to copy additional files (like additional JavaScript or stylesheet files) into the generated target directory. It is possible to inform QF-Test about such files. Therefore one simply creates a file with the name 'files-to-copy.txt'. In this text file the additional JavaScript, stylesheet or image files are specified. (One file by line.)
New comment
( Will be displayed on the page )
( Will not be displayed on the page )

0 comments

You have new topics in mind?
Please share them with us via blog@remove-this.qfs.de or within the comments.