- From: Arthur Ryman via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 11 Nov 2005 06:10:53 +0000
- To: public-ws-desc-eds@w3.org
Update of /sources/public/2002/ws/desc/test-suite In directory hutz:/tmp/cvs-serv13751/test-suite Modified Files: build.xml test-suite.xml Added Files: test-suite-reports.xsl test-suite-coverage-summary.xsl test-suite-reports.xml coverage.xsl Log Message: Generate test coverage summary report. Index: build.xml =================================================================== RCS file: /sources/public/2002/ws/desc/test-suite/build.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** build.xml 10 Nov 2005 06:26:52 -0000 1.11 --- build.xml 11 Nov 2005 06:10:51 -0000 1.12 *************** *** 7,12 **** ChangeLog: 2005-11-09 Arthur Ryman ryman@ca.ibm.com ! - upgrade to use 2005/08 versions of WSDL 2.0 schemas 2005-04-30 Arthur Ryman ryman@ca.ibm.com --- 7,15 ---- ChangeLog: + 2005-11-11 Arthur Ryman ryman@ca.ibm.com + - Added test coverage summary reports. + 2005-11-09 Arthur Ryman ryman@ca.ibm.com ! - Upgrades to use 2005/08 versions of WSDL 2.0 schemas. 2005-04-30 Arthur Ryman ryman@ca.ibm.com *************** *** 133,135 **** --- 136,146 ---- </target> + <target name="test-suite-reports" description="Generates list of coverage reports."> + <xslt style="test-suite-reports.xsl" in="test-suite.xml" out="test-suite-reports.xml" /> + </target> + + <target name="test-suite-coverage-summary" description="Generates summary of coverage reports."> + <xslt style="test-suite-coverage-summary.xsl" in="wsdl-xpaths.xml" out="test-suite-coverage-summary.xml" /> + </target> + </project> \ No newline at end of file --- NEW FILE: test-suite-reports.xsl --- <?xml version="1.0" encoding="UTF-8"?> <!-- Generates the list of coverage reports for the test suite. --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes" /> <xsl:template match="/test-suite"> <reports> <xsl:apply-templates select="test-case" /> </reports> </xsl:template> <xsl:template match="test-case"> <xsl:variable name="id" select="@id" /> <xsl:for-each select="file"> <xsl:variable name="file" select="." /> <xsl:variable name="base" select="substring-before($file,'.wsdl')" /> <xsl:variable name="extension" select="substring-after($file,$base)" /> <xsl:if test="$extension='.wsdl'"> <report> <xsl:value-of select="concat('reports/',$id,'/',$base,'.xml')"/> </report> </xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet> --- NEW FILE: test-suite-reports.xml --- <?xml version="1.0" encoding="UTF-8"?> <reports> <report>reports/documents/bad/Chameleon-1B/getBalance.xml</report> <report>reports/documents/bad/Chameleon-2B/getBalance.xml</report> <report>reports/documents/bad/Import-1B/XSDimport.xml</report> <report>reports/documents/bad/Import-2B/XSDimportInWSDL.xml</report> <report>reports/documents/bad/Import-3B/XSDimport2.xml</report> <report>reports/documents/bad/Import-3B/XSDimportValid.xml</report> <report>reports/documents/bad/Interface-1B/Interface.xml</report> <report>reports/documents/bad/Interface-2B/Interface.xml</report> <report>reports/documents/bad/Interface-3B/Interface.xml</report> <report>reports/documents/bad/Service-12B/Service.xml</report> <report>reports/documents/bad/Service-13B/Service.xml</report> <report>reports/documents/bad/Service-14B/Service.xml</report> <report>reports/documents/bad/Service-15B/Service.xml</report> <report>reports/documents/bad/Service-1B/Service.xml</report> <report>reports/documents/bad/Service-2B/Service.xml</report> <report>reports/documents/bad/TicketAgent-1B/TicketAgent-bad.xml</report> <report>reports/documents/good/Chameleon-1G/getBalance.xml</report> <report>reports/documents/good/Chameleon-2G/getBalance.xml</report> <report>reports/documents/good/Chameleon-3G/getBalance.xml</report> <report>reports/documents/good/Chameleon-4G/getBalance.xml</report> <report>reports/documents/good/CreditCardFaults-1G/use-credit-card-faults.xml</report> <report>reports/documents/good/GreatH-1G/primer-hotelReservationService.xml</report> <report>reports/documents/good/Import-1G/XSDImport.xml</report> <report>reports/documents/good/Import-2G/XSDImport.xml</report> <report>reports/documents/good/Import-2G/XSDImport2.xml</report> <report>reports/documents/good/ImportedWSDL-1G/retrieveDetails.xml</report> <report>reports/documents/good/ImportedWSDL-1G/updateDetails.xml</report> <report>reports/documents/good/Interface-1G/Interface.xml</report> <report>reports/documents/good/Interface-2G/Interface.xml</report> <report>reports/documents/good/Interface-3G/Interface.xml</report> <report>reports/documents/good/Interface-4G/Interface.xml</report> <report>reports/documents/good/Interface-5G/Interface.xml</report> <report>reports/documents/good/Interface-6G/Interface.xml</report> <report>reports/documents/good/Interface-7G/Interface.xml</report> <report>reports/documents/good/MultipleInlineSchemas-1G/retrieveSchemas.xml</report> <report>reports/documents/good/SchemaId-1G/schemaIds.xml</report> <report>reports/documents/good/SchemaLocationFragment-1G/Items.xml</report> <report>reports/documents/good/Service-1G/Service.xml</report> <report>reports/documents/good/Service-2G/Service.xml</report> <report>reports/documents/good/Service-3G/Service.xml</report> <report>reports/documents/good/ServiceReference-1G/reservationDetails.xml</report> <report>reports/documents/good/ServiceReference-1G/reservationList.xml</report> <report>reports/documents/good/TicketAgent-1G/TicketAgent.xml</report> <report>reports/documents/good/WeathSvc-1G/WeathSvc.xml</report> <report>reports/documents/good/XsImport-1G/reservation.xml</report> <report>reports/documents/good/XsImport-2G/reservationDetails.xml</report> <report>reports/documents/good/XsImport-2G/reservationItems.xml</report> <report>reports/documents/good/XsImport-3G/reservationDetails.xml</report> <report>reports/documents/good/XsImport-3G/reservationItems.xml</report> </reports> Index: test-suite.xml =================================================================== RCS file: /sources/public/2002/ws/desc/test-suite/test-suite.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test-suite.xml 9 Nov 2005 19:36:35 -0000 1.1 --- test-suite.xml 11 Nov 2005 06:10:51 -0000 1.2 *************** *** 1,4 **** --- 1,51 ---- <?xml version="1.0" encoding="utf-8"?> <test-suite> + <test-case id="documents/bad/Chameleon-1B"> + <file>getBalance.wsdl</file> + </test-case> + <test-case id="documents/bad/Chameleon-2B"> + <file>getBalance.wsdl</file> + </test-case> + <test-case id="documents/bad/Import-1B"> + <file>XSDimport.wsdl</file> + </test-case> + <test-case id="documents/bad/Import-2B"> + <file>XSDimportInWSDL.wsdl</file> + </test-case> + <test-case id="documents/bad/Import-3B"> + <file>XSDimport2.wsdl</file> + <file>XSDimportValid.wsdl</file> + </test-case> + <test-case id="documents/bad/Interface-1B"> + <file>Interface.wsdl</file> + </test-case> + <test-case id="documents/bad/Interface-2B"> + <file>Interface.wsdl</file> + </test-case> + <test-case id="documents/bad/Interface-3B"> + <file>Interface.wsdl</file> + </test-case> + <test-case id="documents/bad/Service-12B"> + <file>Service.wsdl</file> + </test-case> + <test-case id="documents/bad/Service-13B"> + <file>Service.wsdl</file> + </test-case> + <test-case id="documents/bad/Service-14B"> + <file>Service.wsdl</file> + </test-case> + <test-case id="documents/bad/Service-15B"> + <file>Service.wsdl</file> + </test-case> + <test-case id="documents/bad/Service-1B"> + <file>Service.wsdl</file> + </test-case> + <test-case id="documents/bad/Service-2B"> + <file>Service.wsdl</file> + </test-case> + <test-case id="documents/bad/TicketAgent-1B"> + <file>TicketAgent-bad.wsdl</file> + </test-case> + <test-case id="documents/good/Chameleon-1G"> <file>getBalance.wsdl</file> *************** *** 13,15 **** --- 60,140 ---- <file>getBalance.wsdl</file> </test-case> + <test-case id="documents/good/CreditCardFaults-1G"> + <file>use-credit-card-faults.wsdl</file> + </test-case> + <test-case id="documents/good/GreatH-1G"> + <file>primer-hotelReservationService.wsdl</file> + </test-case> + <test-case id="documents/good/Import-1G"> + <file>XSDImport.wsdl</file> + </test-case> + <test-case id="documents/good/Import-2G"> + <file>XSDImport.wsdl</file> + <file>XSDImport2.wsdl</file> + </test-case> + <test-case id="documents/good/ImportedWSDL-1G"> + <file>retrieveDetails.wsdl</file> + <file>updateDetails.wsdl</file> + </test-case> + <test-case id="documents/good/Interface-1G"> + <file>Interface.wsdl</file> + </test-case> + <test-case id="documents/good/Interface-2G"> + <file>Interface.wsdl</file> + </test-case> + <test-case id="documents/good/Interface-3G"> + <file>Interface.wsdl</file> + </test-case> + <test-case id="documents/good/Interface-4G"> + <file>Interface.wsdl</file> + </test-case> + <test-case id="documents/good/Interface-5G"> + <file>Interface.wsdl</file> + </test-case> + <test-case id="documents/good/Interface-6G"> + <file>Interface.wsdl</file> + </test-case> + <test-case id="documents/good/Interface-7G"> + <file>Interface.wsdl</file> + </test-case> + <test-case id="documents/good/MultipleInlineSchemas-1G"> + <file>retrieveSchemas.wsdl</file> + </test-case> + <test-case id="documents/good/SchemaId-1G"> + <file>schemaIds.wsdl</file> + </test-case> + <test-case id="documents/good/SchemaLocationFragment-1G"> + <file>Items.wsdl</file> + </test-case> + <test-case id="documents/good/Service-1G"> + <file>Service.wsdl</file> + </test-case> + <test-case id="documents/good/Service-2G"> + <file>Service.wsdl</file> + </test-case> + <test-case id="documents/good/Service-3G"> + <file>Service.wsdl</file> + </test-case> + <test-case id="documents/good/ServiceReference-1G"> + <file>reservationDetails.wsdl</file> + <file>reservationList.wsdl</file> + </test-case> + <test-case id="documents/good/TicketAgent-1G"> + <file>TicketAgent.wsdl</file> + </test-case> + <test-case id="documents/good/WeathSvc-1G"> + <file>WeathSvc.wsdl</file> + </test-case> + <test-case id="documents/good/XsImport-1G"> + <file>reservation.wsdl</file> + </test-case> + <test-case id="documents/good/XsImport-2G"> + <file>reservationDetails.wsdl</file> + <file>reservationItems.wsdl</file> + </test-case> + <test-case id="documents/good/XsImport-3G"> + <file>reservationDetails.wsdl</file> + <file>reservationItems.wsdl</file> + </test-case> + </test-suite> \ No newline at end of file --- NEW FILE: test-suite-coverage-summary.xsl --- <?xml version="1.0" encoding="UTF-8"?> <!-- Generates summary of coverage. --> <xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://www.w3.org/2005/08/wsdl" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" exclude-result-prefixes="xs wsdl"> <xsl:output method="xml" indent="yes" /> <xsl:variable name="reports" select="document('test-suite-reports.xml')//report" /> <xsl:variable name="items" select="document($reports)//item" /> <xsl:template match="/xpaths"> <xsl:processing-instruction name="xml-stylesheet">type="text/xsl" href="coverage.xsl"</xsl:processing-instruction> <coverage> <xsl:apply-templates select="xpath" /> </coverage> </xsl:template> <xsl:template match="xpath"> <xsl:variable name="xpath" select="normalize-space(.)" /> <item> <xsl:attribute name="xpath"> <xsl:value-of select="$xpath" /> </xsl:attribute> <xsl:attribute name="count"> <xsl:value-of select="sum($items[@xpath=$xpath]/@count)" /> </xsl:attribute> </item> </xsl:template> </xsl:stylesheet> --- NEW FILE: coverage.xsl --- <?xml version="1.0" encoding="UTF-8"?> <!-- Formats coverage report. --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html" indent="yes" /> <xsl:variable name="reports" select="document('test-suite-reports.xml')//report" /> <xsl:variable name="items" select="document($reports)//item" /> <xsl:template match="/coverage"> <html> <head> <title>Test Case Coverage Report</title> </head> <body> <h1>Test Case Coverage Report</h1> <table border="1" cellspacing="4"> <thead> <tr> <th>Status</th> <th>Count</th> <th>XPath</th> </tr> </thead> <tbody> <xsl:apply-templates select="item" /> </tbody> </table> </body> </html> </xsl:template> <xsl:template match="item"> <tr> <td> <xsl:attribute name="bgcolor"> <xsl:choose> <xsl:when test="@count = 0">red</xsl:when> <xsl:when test="@count < 4">yellow</xsl:when> <xsl:otherwise>green</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:text> </xsl:text> </td> <td> <xsl:value-of select="@count" /> </td> <td> <xsl:value-of select="@xpath" /> </td> </tr> </xsl:template> </xsl:stylesheet>
Received on Friday, 11 November 2005 06:10:57 UTC