How to make a detailed test report

daraujo
2004-11-23
2013-04-22
  • daraujo
    daraujo
    2004-11-23

    I also would like to have a look at your solution, pls send me an email. Thanks in advance!

     
  • vivid
    vivid
    2004-11-29

    I would also like to see your solution :D thanks

     
  • Ekart Laszlo
    Ekart Laszlo
    2005-02-04

    Hi again almoust after I year.
    Well When I have finised the solution I have uploaded the source code to the feature request:

    https://sourceforge.net/tracker/index.php?func=detail&aid=923069&group_id=11795&atid=361795

    It is not exactly the best quality but it is ok (I wrote in 2 days and I did not had any knowledge of CppUnit before that)

    Here is an xls for the xml output, I forgot to put on thet package if I remember:

    -----------------------
    <?xml version="1.0" encoding="ISO-8859-1"?>

    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:template match="/">
        <html>
        <body>
     
        <table border="1" summary="TheErrorReport">

            <!-- Main Record Begin -->
                   
            <xsl:for-each select="TestRun/TestCases/Test">
           
            <tr bgcolor="#0000FF">
                <th>Test Id</th>
                <th>Name</th>
                <th>Requirement Key</th>
                <th>Input Action</th>
                <th>Expected Outcome</th>
                <th>Real Outcome</th>
                <th>Result</th>
        </tr>
           
        <tr>
                <td> <xsl:value-of select="@id"/> </td>       
                <td> <xsl:value-of select="Name"/> </td>
               
                <td>
                <xsl:for-each select="ReqKey">
                    <xsl:value-of select="."/> <BR/>
                </xsl:for-each>
                </td>
               
                <td> <xsl:value-of select="InputAction"/> </td>
                <td> <xsl:value-of select="ExpectedOutcome"/> </td>
                <td> <xsl:value-of select="RealOutcome"/> </td>
                <td> <xsl:value-of select="Result"/> </td>
        </tr>
           
            <!-- Main Record End  -->       
           
        <!-- Failed Information BEGIN -->
           
            <xsl:if test="FailedInfo">
           
        <tr bgcolor="#FF0000">
            <th COLSPAN="7"> Failed Info </th>
        </tr>
       
        <tr>
                    <th> FailureType </th>
                    <th COLSPAN="3"> File </th>
                    <th> Line </th>
                    <th COLSPAN="2"> Message </th>
            </tr>
           
            <tr>
                    <td> <xsl:value-of select="FailedInfo/FailureType"/> </td>
                    <td COLSPAN="3"> <xsl:value-of select="FailedInfo/Location/File"/> </td>
                    <td> <xsl:value-of select="FailedInfo/Location/Line"/> </td>
                    <td COLSPAN="2"> <xsl:value-of select="FailedInfo/Message"/> </td>
            </tr>
           
            </xsl:if>
           
            <!-- Additonal info Begin -->
           
            <xsl:if test="TRACE">
                   
        <tr bgcolor="#00FF00">
                <th COLSPAN="7"> TRACE </th>
        </tr>
       
            <xsl:for-each select="TRACE">
        <tr>
            <td COLSPAN="7"> <xsl:value-of select="."/> </td>
        </tr>
            </xsl:for-each>
           
            </xsl:if>
           
        <!-- Additional info End -->
                   
            </xsl:for-each>

        </table>
       
        <BR/>
        <BR/>

        <!-- Summary Begin -->
        <table summary="Summary" width="25%" border="1">
                <tr>
                        <th COLSPAN="2">Statistics</th>
                </tr>
                <tr>
                        <th>Tests</th>
                        <td> <xsl:value-of select="TestRun/Statistics/Tests"/> </td>
                </tr>
                <tr>
                        <th>FailuresTotal</th>
                        <td> <xsl:value-of select="TestRun/Statistics/FailuresTotal"/> </td>
                </tr>
                <tr>
                        <th>Errors</th>
                        <td> <xsl:value-of select="TestRun/Statistics/Errors"/> </td>
                </tr>
                <tr>
                        <th>Failures</th>
                        <td> <xsl:value-of select="TestRun/Statistics/Failures"/> </td>
                </tr>
        </table>
        <!-- Summary End -->

        </body>
        </html>
    </xsl:template></xsl:stylesheet>
    -------------------------