Cleanup among build files; added more of the DLLs for resilience

This commit is contained in:
Rick Falkvinge
2014-10-10 09:50:17 +02:00
parent aec847cafe
commit d851ff7b76
77 changed files with 10145 additions and 2672 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+351
View File
@@ -0,0 +1,351 @@
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<!-- ======== SWARMOPS INTERNAL RELEASE ======== -->
<project name="Swarmops">
<workingDirectory>C:\Lab\Swarmops\build</workingDirectory>
<artifactDirectory>C:\Lab\Swarmops\artifact</artifactDirectory>
<webURL>http://build.swarmops.com/server/auxiliary/project/Swarmops/ViewLatestBuildReport.aspx</webURL>
<sourcecontrol type="git">
<repository>git://github.com/Swarmops/Swarmops</repository>
<branch>master</branch>
<cleanUntrackedFiles>true</cleanUntrackedFiles>
<autoGetSource>true</autoGetSource>
<fetchSubmodules>true</fetchSubmodules>
<executable>git</executable>
<tagOnSuccess>false</tagOnSuccess>
<commitBuildModifications>false</commitBuildModifications>
<commitUntrackedFiles>false</commitUntrackedFiles>
<tagCommitMessage>Build {0}</tagCommitMessage>
<tagNameFormat>Build-{0}</tagNameFormat>
<committerName>Swarmops Build</committerName>
<committerEMail>builds@swarmops.com</committerEMail>
<workingDirectory>c:\Lab\Swarmops\build</workingDirectory>
<timeout>180000</timeout>
</sourcecontrol>
<triggers>
<intervalTrigger name="continuous" seconds="60" />
</triggers>
<labeller type="assemblyVersionLabeller">
<major>5</major>
<minor>0</minor>
<revision>0</revision>
<incrementOnFailure>false</incrementOnFailure>
</labeller>
<tasks>
<!-- Build backend -->
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
<workingDirectory>C:\Lab\Swarmops\build</workingDirectory>
<projectFile>Backend\Backend.csproj</projectFile>
<buildArgs>/p:Configuration=Release</buildArgs>
<targets>Build</targets>
<timeout>1200</timeout>
<logger>C:\Program Files (x86)\CruiseControl.NET\server\Rodemeyer.MsBuildToCCnet.dll</logger>
</msbuild>
<!-- Build frontend -->
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
<workingDirectory>C:\Lab\Swarmops\build</workingDirectory>
<projectFile>Interface\Interface.csproj</projectFile>
<buildArgs>/p:Configuration=Release</buildArgs>
<targets>Build</targets>
<timeout>1200</timeout>
<logger>C:\Program Files (x86)\CruiseControl.NET\server\Rodemeyer.MsBuildToCCnet.dll</logger>
</msbuild>
<!-- Deploy: only on success of all steps above -->
<buildpublisher>
<sourceDir>C:\Lab\Swarmops\build\Site5-Deployment</sourceDir>
<publishDir>\\swarmops-dev\builddrop\swarmops\internal\frontend</publishDir>
<useLabelSubDirectory>false</useLabelSubDirectory>
<cleanPublishDirPriorToCopy>true</cleanPublishDirPriorToCopy>
<alwaysPublish>false</alwaysPublish>
</buildpublisher>
<buildpublisher>
<sourceDir>C:\Lab\Swarmops\build\Backend\bin\Release</sourceDir>
<publishDir>\\swarmops-dev\builddrop\swarmops\internal\backend</publishDir>
<useLabelSubDirectory>false</useLabelSubDirectory>
<cleanPublishDirPriorToCopy>true</cleanPublishDirPriorToCopy>
<alwaysPublish>false</alwaysPublish>
</buildpublisher>
<!-- Write metadata to deploy dirs, signal packager that new build available -->
<exec>
<executable>cmd.exe</executable>
<buildArgs>/c echo %CCNetLabel% > \\swarmops-dev\builddrop\swarmops\internal\BuildIdentity.txt</buildArgs>
</exec>
<exec>
<executable>cmd.exe</executable>
<buildArgs>/c git rev-parse HEAD > \\swarmops-dev\builddrop\swarmops\internal\CommitIdentity.txt</buildArgs>
</exec>
<exec>
<executable>cmd.exe</executable>
<buildArgs>/c git log -3 --pretty="%h: %B" > \\swarmops-dev\builddrop\swarmops\internal\CommitMessage.txt</buildArgs>
</exec>
<exec>
<executable>cmd.exe</executable>
<buildArgs>/c echo %CCNetLabel% > \\swarmops-dev\builddrop\swarmops\internal\BuildDropped.txt</buildArgs>
</exec>
<!-- Analysis: QA that is not build-breaking: FxCop etc. -->
<!--
<exec>
<executable>C:\Program Files\Microsoft FxCop 1.36\FxCopCmd.exe</executable>
<baseDirectory>C:\Lab\Swarmops\build</baseDirectory>
<buildArgs>/p:"Swarmops.FxCop" /out:"FxCop-results.xml" /gac</buildArgs>
<buildTimeoutSeconds>300</buildTimeoutSeconds>
</exec>-->
</tasks>
<publishers>
<merge>
<files>
<!-- <file>C:\Lab\Swarmops\build\msbuild-output.xml</file> -->
<!-- <file>C:\Lab\Swarmops\build\FxCop-results.xml</file> -->
</files>
</merge>
<xmllogger />
<email mailport="25" includeDetails="TRUE">
<from>builds@swarmops.com</from>
<mailhost>192.168.80.204</mailhost>
<users>
<user name="Rick Falkvinge" group="buildmaster" address="swarmops-builds@falkvinge.net" />
<user name="Leif Ershag" group="devs" address="leif@ershag.se" />
<user name="Tom Jeffries" group="devs" address="tom@safe-xchange.com" />
<user name="Christiaan de Die" group="devs" address="christiaan@droiddev.nl" />
<!-- <user name="Jörgen Lindell" group="buildmaster" address="jorgen.lindell@gmail.com" /> -->
</users>
<groups>
<group name="devs">
<notifications>
<notificationType>Failed</notificationType>
<notificationType>Fixed</notificationType>
<notificationType>Success</notificationType>
</notifications>
</group>
<group name="buildmaster">
<notifications>
<notificationType>Always</notificationType>
</notifications>
</group>
</groups>
<modifierNotificationTypes>
<NotificationType>Failed</NotificationType>
<NotificationType>Fixed</NotificationType>
</modifierNotificationTypes>
<subjectSettings>
<subject buildResult="StillBroken" value="Build is STILL broken for Swarmops" />
</subjectSettings>
<xslFiles>
<file>xsl\header.xsl</file>
<file>xsl\msbuild2ccnet.xsl</file>
<file>xsl\unittests.xsl</file>
<file>xsl\fxcop-summary_1_36.xsl</file>
<file>xsl\modifications.xsl</file>
<file>xsl\fxcop-report_1_36.xsl</file>
</xslFiles>
</email>
</publishers>
</project>
<!-- ======== SWARMOPS SPRINT RELEASE ======== -->
<project name="Swarmops-Sprint">
<workingDirectory>C:\Lab\Swarmops\sprint</workingDirectory>
<artifactDirectory>C:\Lab\Swarmops\artifact-sprint</artifactDirectory>
<webURL>http://build.swarmops.com/server/auxiliary/project/Swarmops/ViewLatestBuildReport.aspx</webURL>
<sourcecontrol type="git">
<repository>git://github.com/Swarmops/Swarmops</repository>
<branch>sprint</branch>
<cleanUntrackedFiles>true</cleanUntrackedFiles>
<autoGetSource>true</autoGetSource>
<fetchSubmodules>true</fetchSubmodules>
<executable>git</executable>
<tagOnSuccess>false</tagOnSuccess>
<commitBuildModifications>false</commitBuildModifications>
<commitUntrackedFiles>false</commitUntrackedFiles>
<tagCommitMessage>Build {0}</tagCommitMessage>
<tagNameFormat>Build-{0}</tagNameFormat>
<committerName>Swarmops Build</committerName>
<committerEMail>builds@swarmops.com</committerEMail>
<workingDirectory>c:\Lab\Swarmops\sprint</workingDirectory>
<timeout>180000</timeout>
</sourcecontrol>
<triggers>
<intervalTrigger name="continuous" seconds="60" />
</triggers>
<labeller type="assemblyVersionLabeller">
<major>5</major>
<minor>0</minor>
<revision>0</revision>
<incrementOnFailure>false</incrementOnFailure>
</labeller>
<tasks>
<!-- Build backend -->
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
<workingDirectory>C:\Lab\Swarmops\sprint</workingDirectory>
<projectFile>Backend\Backend.csproj</projectFile>
<buildArgs>/p:Configuration=Release</buildArgs>
<targets>Build</targets>
<timeout>1200</timeout>
<logger>C:\Program Files (x86)\CruiseControl.NET\server\Rodemeyer.MsBuildToCCnet.dll</logger>
</msbuild>
<!-- Build frontend -->
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
<workingDirectory>C:\Lab\Swarmops\sprint</workingDirectory>
<projectFile>Interface\Interface.csproj</projectFile>
<buildArgs>/p:Configuration=Release</buildArgs>
<targets>Build</targets>
<timeout>1200</timeout>
<logger>C:\Program Files (x86)\CruiseControl.NET\server\Rodemeyer.MsBuildToCCnet.dll</logger>
</msbuild>
<!-- Deploy: only on success of all steps above -->
<buildpublisher>
<sourceDir>C:\Lab\Swarmops\sprint\Site5-Deployment</sourceDir>
<publishDir>\\swarmops-dev\builddrop\swarmops\sprint\frontend</publishDir>
<useLabelSubDirectory>false</useLabelSubDirectory>
<cleanPublishDirPriorToCopy>true</cleanPublishDirPriorToCopy>
<alwaysPublish>false</alwaysPublish>
</buildpublisher>
<buildpublisher>
<sourceDir>C:\Lab\Swarmops\sprint\Backend\bin\Release</sourceDir>
<publishDir>\\swarmops-dev\builddrop\swarmops\sprint\backend</publishDir>
<useLabelSubDirectory>false</useLabelSubDirectory>
<cleanPublishDirPriorToCopy>true</cleanPublishDirPriorToCopy>
<alwaysPublish>false</alwaysPublish>
</buildpublisher>
<!-- Write metadata to deploy folder, signal packager that new build is available -->
<exec>
<executable>cmd.exe</executable>
<buildArgs>/c echo %CCNetLabel% > \\swarmops-dev\builddrop\swarmops\sprint\BuildIdentity.txt</buildArgs>
</exec>
<exec>
<executable>cmd.exe</executable>
<buildArgs>/c git rev-parse HEAD > \\swarmops-dev\builddrop\swarmops\sprint\CommitIdentity.txt</buildArgs>
</exec>
<!-- no "last git commit messages" written to deployment dir, as they aren't used for the sprint release -->
<exec>
<executable>cmd.exe</executable>
<buildArgs>/c echo %CCNetLabel% > \\swarmops-dev\builddrop\swarmops\sprint\BuildDropped.txt</buildArgs>
</exec>
<!-- Analysis: QA that is not build-breaking: FxCop etc. -->
<!--
<exec>
<executable>C:\Program Files\Microsoft FxCop 1.36\FxCopCmd.exe</executable>
<baseDirectory>C:\Lab\Swarmops\build</baseDirectory>
<buildArgs>/p:"Swarmops.FxCop" /out:"FxCop-results.xml" /gac</buildArgs>
<buildTimeoutSeconds>300</buildTimeoutSeconds>
</exec>-->
</tasks>
<publishers>
<merge>
<files>
<!-- <file>C:\Lab\Swarmops\build\msbuild-output.xml</file> -->
<!-- <file>C:\Lab\Swarmops\build\FxCop-results.xml</file> -->
</files>
</merge>
<xmllogger />
<email mailport="25" includeDetails="TRUE">
<from>builds@swarmops.com</from>
<mailhost>192.168.80.204</mailhost>
<users>
<user name="Rick Falkvinge" group="buildmaster" address="swarmops-builds@falkvinge.net" />
<user name="Leif Ershag" group="devs" address="leif@ershag.se" />
<user name="Tom Jeffries" group="devs" address="tom@safe-xchange.com" />
<user name="Christiaan de Die" group="devs" address="christiaan@droiddev.nl" />
<!-- <user name="Jörgen Lindell" group="buildmaster" address="jorgen.lindell@gmail.com" /> -->
</users>
<groups>
<group name="devs">
<notifications>
<notificationType>Failed</notificationType>
<notificationType>Fixed</notificationType>
<notificationType>Success</notificationType>
</notifications>
</group>
<group name="buildmaster">
<notifications>
<notificationType>Always</notificationType>
</notifications>
</group>
</groups>
<modifierNotificationTypes>
<NotificationType>Failed</NotificationType>
<NotificationType>Fixed</NotificationType>
</modifierNotificationTypes>
<subjectSettings>
<subject buildResult="StillBroken" value="Build is STILL broken for Swarmops-Sprint" />
</subjectSettings>
<xslFiles>
<file>xsl\header.xsl</file>
<file>xsl\msbuild2ccnet.xsl</file>
<file>xsl\unittests.xsl</file>
<file>xsl\fxcop-summary_1_36.xsl</file>
<file>xsl\modifications.xsl</file>
<file>xsl\fxcop-report_1_36.xsl</file>
</xslFiles>
</email>
</publishers>
</project>
</cruisecontrol>
+160
View File
@@ -0,0 +1,160 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="xslFiles" type="ThoughtWorks.CruiseControl.Core.Config.XslFilesSectionHandler,ThoughtWorks.CruiseControl.Core"/>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
<section name="cruiseServer" type="ThoughtWorks.CruiseControl.Core.Config.ServerConfigurationHandler,ThoughtWorks.CruiseControl.Core"/>
</configSections>
<!-- Specifies the stylesheets that are used to transform the build results when using the EmailPublisher -->
<xslFiles>
<file name="xsl\header.xsl"/>
<file name="xsl\msbuild2ccnet.xsl"/>
<file name="xsl\unittests.xsl"/>
<file name="xsl\fit.xsl"/>
<file name="xsl\modifications.xsl"/>
</xslFiles>
<cruiseServer>
</cruiseServer>
<!-- Defines the port and protocol that the ccnet server will use to service remote requests -->
<system.runtime.remoting>
<application>
<channels>
<channel ref="tcp" port="21234">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</serverProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
<appSettings>
<!--
Used by the WebDashboard ServerLog plugin to locate the log file produced by the LogFileTraceListener from Log4Net
must be the same value as in the logger named RollingFileAppender in the log4Net section below.
-->
<add key="ServerLogFilePath" value="${TMP}\ccnet.log"/>
<!-- Used by the WebDashboard ServerLog plugin to determine how many lines from the log file should be read -->
<add key="ServerLogFileLines" value="100"/>
<!-- Turns on or off the file watcher used to monitor the ccnet.config file -->
<add key="WatchConfigFile" value="true"/>
<!--when filled in this location is also scanned for assemblies following the name convention : ccnet.*.plugin (case sensitive)-->
<add key="PluginLocation" value=""/>
<!-- the main data drive used by CruiseControl.NET. This is used for checking the amount of free disk space. Defaults to c:\ -->
<add key="DataDrive" value=""/>
<!-- The amount of time (in seconds) a build log will be cached for before it is expired. The minimum allowed value is 10 seconds. Default 5 minutes -->
<add key="cacheTime" value=""/>
</appSettings>
<startup>
</startup>
<log4net>
<level>
<name value="TRACE" />
<value value="20000" />
</level>
<root>
<!--
Change the value in the next line to alter the amount of logging generated by CruiseControl.NET.
The following values are supported: TRACE, DEBUG, INFO, WARN, ERROR, OFF.
For more detailed information on how to configure log4net, see http://logging.apache.org/log4net/
-->
<level value="TRACE"/>
<appender-ref ref="Console"/>
<appender-ref ref="RollingFileAppender"/>
<appender-ref ref="EventLogAppender"/>
<appender-ref ref="TraceAppender"/>
</root>
<appender name="Console" type="log4net.Appender.ColoredConsoleAppender">
<mapping>
<level value="ERROR"/>
<foreColor value="White"/>
<backColor value="Red, HighIntensity"/>
</mapping>
<mapping>
<level value="DEBUG"/>
<foreColor value="Green"/>
</mapping>
<mapping>
<level value="WARN"/>
<foreColor value="White"/>
<backColor value="Blue, HighIntensity"/>
</mapping>
<mapping>
<level value="INFO"/>
<foreColor value="White"/>
</mapping>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%thread:%level] %message%newline"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<acceptOnMatch value="true" />
<levelMin value="DEBUG" />
<levelMax value="ERROR" />
</filter>
</appender>
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="${TMP}\ccnet.log"/>
<appendToFile value="true"/>
<rollingStyle value="Size"/>
<maxSizeRollBackups value="10"/>
<maximumFileSize value="10MB"/>
<staticLogFileName value="true"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread:%level] %message%newline"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<acceptOnMatch value="true" />
<levelMin value="DEBUG" />
<levelMax value="ERROR" />
</filter>
</appender>
<appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<levelMin value="ERROR" />
<levelMax value="ERROR" />
</filter>
</appender>
<appender name="TraceAppender" type="log4net.Appender.RollingFileAppender" >
<file value="${TMP}\ccnet.trace"/>
<appendToFile value="true"/>
<rollingStyle value="Size"/>
<maxSizeRollBackups value="10"/>
<maximumFileSize value="10MB"/>
<staticLogFileName value="true"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] [%level] - %message%newline" />
</layout>
</appender>
</log4net>
<!-- Handle backwards compatibility with previous versions of NetReflector (for plug-ins etc.) -->
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NetReflector" publicKeyToken="2f4dd8b32acbcd8e" culture="neutral" />
<bindingRedirect oldVersion="1.0.0.120" newVersion="1.1.2009.1214"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
+155
View File
@@ -0,0 +1,155 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="xslFiles" type="ThoughtWorks.CruiseControl.Core.Config.XslFilesSectionHandler,ThoughtWorks.CruiseControl.Core"/>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
<section name="cruiseServer" type="ThoughtWorks.CruiseControl.Core.Config.ServerConfigurationHandler,ThoughtWorks.CruiseControl.Core"/>
</configSections>
<!-- Specifies the stylesheets that are used to transform the build results when using the EmailPublisher -->
<xslFiles>
<file name="xsl\header.xsl"/>
<file name="xsl\compile.xsl"/>
<file name="xsl\unittests.xsl"/>
<file name="xsl\fit.xsl"/>
<file name="xsl\modifications.xsl"/>
<file name="xsl\fxcop-summary_1_36.xsl"/>
</xslFiles>
<cruiseServer>
</cruiseServer>
<!-- Defines the port and protocol that the ccnet server will use to service remote requests -->
<system.runtime.remoting>
<application>
<channels>
<channel ref="tcp" port="21234">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</serverProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
<log4net>
<level>
<name value="TRACE" />
<value value="20000" />
</level>
<root>
<!--
Change the value in the next line to alter the amount of logging generated by CruiseControl.NET.
The following values are supported: TRACE, DEBUG, INFO, WARN, ERROR, OFF.
For more detailed information on how to configure log4net, see http://logging.apache.org/log4net/
-->
<level value="TRACE"/>
<appender-ref ref="Console"/>
<appender-ref ref="RollingFileAppender"/>
<appender-ref ref="EventLogAppender"/>
<appender-ref ref="TraceAppender"/>
</root>
<appender name="Console" type="log4net.Appender.ConsoleAppender">
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%thread:%level] %message%newline"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<acceptOnMatch value="true" />
<levelMin value="DEBUG" />
<levelMax value="ERROR" />
</filter>
</appender>
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="${TMP}\ccnet.log"/>
<appendToFile value="true"/>
<rollingStyle value="Size"/>
<maxSizeRollBackups value="10"/>
<maximumFileSize value="10MB"/>
<staticLogFileName value="true"/>
<layout type="log4net.Layout.PatternLayout">
<!-- Note: Core.Logging.ServerLogFileReader depends on having "[%thread" present in the pattern -->
<conversionPattern value="%date [%thread:%level] %message%newline"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<acceptOnMatch value="true" />
<levelMin value="DEBUG" />
<levelMax value="ERROR" />
</filter>
</appender>
<appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<levelMin value="ERROR" />
<levelMax value="ERROR" />
</filter>
</appender>
<appender name="TraceAppender" type="log4net.Appender.RollingFileAppender" >
<file value="${TMP}\ccnet.trace"/>
<appendToFile value="true"/>
<rollingStyle value="Size"/>
<maxSizeRollBackups value="10"/>
<maximumFileSize value="10MB"/>
<staticLogFileName value="true"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] [%level] - %message%newline" />
</layout>
</appender>
</log4net>
<appSettings>
<!-- Without this appSetting ccservice will look for ccnet.config in its own directory. -->
<!-- <add key="ccnet.config" value="c:\some\path\to\ccnet.config"/> -->
<add key="service.name" value="CCService"/>
<add key="remoting" value="on"/>
<!--
Used by the WebDashboard ServerLog plugin to locate the log file produced by the LogFileTraceListener from Log4Net
must be the same value as in the logger named RollingFileAppender in the log4Net section below.
-->
<add key="ServerLogFilePath" value="${TMP}\ccnet.log"/>
<!-- Used by the WebDashboard ServerLog plugin to determine how many lines from the log file should be read -->
<add key="ServerLogFileLines" value="100"/>
<!-- Turns on or off the file watcher used to monitor the ccnet.config file -->
<add key="WatchConfigFile" value="true"/>
<!--when filled in this location is also scanned for assemblies following the name convention : ccnet.*.plugin (case sensitive)-->
<add key="PluginLocation" value=""/>
<!-- the main data drive used by CruiseControl.NET. This is used for checking the amount of free disk space. Defaults to c:\ -->
<add key="DataDrive" value=""/>
<!-- The amount of time (in seconds) a build log will be cached for before it is expired. The minimum allowed value is 10 seconds. Default 5 minutes -->
<add key="cacheTime" value=""/>
</appSettings>
<startup>
</startup>
<!-- Handle backwards compatibility with previous versions of NetReflector (for plug-ins etc.) -->
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NetReflector" publicKeyToken="2f4dd8b32acbcd8e" culture="neutral" />
<bindingRedirect oldVersion="1.0.0.120" newVersion="1.1.2009.1214"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,380 @@
<?xml version="1.0" standalone="yes"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/TR/html4/strict.dtd"
exclude-result-prefixes=""
>
<xsl:output method="html"
encoding="ISO-8859-1"
standalone="yes"
version="1.0"
indent="yes"/>
<xsl:param name="applicationPath"/>
<xsl:template match="/">
<div id="report">
<script type="text/javascript">
function toggleDiv(imgId, divId)
{
eDiv = document.getElementById(divId);
eImg = document.getElementById(imgId);
if ( eDiv.style.display == "none" )
{
eDiv.style.display="block";
eImg.src="<xsl:value-of select="$applicationPath"/>/images/arrow_minus_small.gif";
}
else
{
eDiv.style.display = "none";
eImg.src="<xsl:value-of select="$applicationPath"/>/images/arrow_plus_small.gif";
}
}
function toggleTr(imgId, trId)
{
eTr = document.getElementById(trId);
eImg = document.getElementById(imgId);
if ( eTr.style.display == "none" )
{
/* Setting a TR to display:block doesn't work in proper browsers
but IE6's dodgy CSS implementation doesn't know table-row so
we need to try...catch it */
try
{
eTr.style.display="table-row";
}
catch(e)
{
eTr.style.display="block";
}
eImg.src="<xsl:value-of select="$applicationPath"/>/images/arrow_minus_small.gif";
}
else
{
eTr.style.display = "none";
eImg.src="<xsl:value-of select="$applicationPath"/>/images/arrow_plus_small.gif";
}
}
</script>
<style type="text/css">
#master { font: small Verdana }
#master table { border-collapse:collapse; table-layout: fixed;}
#master tr { height: 25px; vertical-align: middle; }
#master th { text-align: center; border-bottom: 1px solid black; border-top: 1px solid black;}
#master div { box-sizing: content-box; -moz-box-sizing: content-box; }
#master img { display: inline-block; vertical-align: middle; }
.col1 { width: 100%; overflow: hidden; min-width: 190px;}
.col2 { width: 350px; min-width: 170px; }
.col3 { width: 60px; text-align: center; min-width: 40px; max-width: 40px; }
th.col2 { border-right: 1px solid black; border-left: 1px solid black; -moz-box-sizing: content-box;}
td.col2 div { margin: 0px; padding: 0px; float: left; height: 15px; }
.testAssembly { border: 2px solid black; padding: 5px 2px 5px 2px; margin-bottom: 10px; min-width: 400px}
.testAssembly table { width: 100%; min-width: 400px; }
.testAssembly .testTable { margin: 0 auto; left: 25px; width: 95%; border: 1px solid gray;}
.testTable td { border: 1px solid gray; overflow: hidden; padding: 2px 5px 2px 5px; background-color: inherit;}
.testName { width: 40%; white-space: nowrap;}
.testMsg { width: 60%; }
.testMsg div { overflow: auto; width: 100%;}
tr.succeeded { background-color: rgb(145,222,121);}
tr.failed { background-color: rgb(245,147,147);}
tr.ignored { background-color: rgb(252,242,80);}
tr.unknown { background-color: gray;}
div.succeeded { border: 1px solid green; background-color: rgb(59,216,23);}
div.failed { border: 1px solid rgb(177,26,26); background-color: rgb(228,95,95);}
div.ignored { border: 1px solid rgb(233,221,26); background-color: yellow;}
div.unknown { border: 1px solid black; background-color: gray;}
.category { padding-left: 21px; font-style: oblique; font-size: smaller;}
.clickable { cursor: pointer; }
</style>
<xsl:for-each select="//test-results[test-suite]">
<xsl:variable name="divId">
<xsl:value-of select="generate-id(test-suite/@name)" />
</xsl:variable>
<div style="margin-bottom: 5px;">
<xsl:attribute name="onclick">
<xsl:text>toggleDiv('img-</xsl:text>
<xsl:value-of select="$divId" />
<xsl:text>','</xsl:text>
<xsl:value-of select="$divId" />
<xsl:text>')</xsl:text>
</xsl:attribute>
<xsl:attribute name="class">
<xsl:text>clickable</xsl:text>
</xsl:attribute>
<img src="{$applicationPath}/images/arrow_minus_small.gif" alt="Toggle display of Tests contained within this assembly">
<xsl:attribute name="id">
<xsl:text>img-</xsl:text>
<xsl:value-of select="$divId" />
</xsl:attribute>
</img>
<xsl:text>&#0160;</xsl:text>
<strong>
<xsl:call-template name="getSuiteName">
<xsl:with-param name="name" select="test-suite/@name" />
</xsl:call-template>
</strong>
<xsl:text>&#0160;-&#0160;</xsl:text>
<xsl:value-of select="@total + @not-run"/>
<xsl:text>&#0160;tests&#0160;(</xsl:text>
<xsl:value-of select="@total - @failures" />
<xsl:text>&#0160;passed,&#0160;</xsl:text>
<xsl:value-of select="@failures" />
<xsl:text>&#0160;failed,&#0160;</xsl:text>
<xsl:value-of select="@not-run" />
<xsl:text>&#0160;didn't run)</xsl:text>
</div>
<div class="testAssembly">
<xsl:attribute name="id">
<xsl:value-of select="$divId" />
</xsl:attribute>
<table>
<tr>
<th class="col1">Test Fixture</th>
<th class="col2">Results</th>
<th class="col3">Passes</th>
</tr>
<xsl:for-each select=".//test-suite[results/test-case]">
<xsl:sort select="@name" order="ascending" data-type="text" />
<xsl:variable name="testsId">
<xsl:value-of select="generate-id(results/test-case/@name)" />
</xsl:variable>
<tr>
<td class="col1">
<span>
<xsl:attribute name="onclick">
<xsl:text>toggleTr('img-</xsl:text>
<xsl:value-of select="$testsId" />
<xsl:text>','</xsl:text>
<xsl:value-of select="$testsId" />
<xsl:text>')</xsl:text>
</xsl:attribute>
<xsl:attribute name="class">
<xsl:text>clickable</xsl:text>
</xsl:attribute>
<img src="{$applicationPath}/images/arrow_plus_small.gif" alt="Toggle display of the tests within this text fixture">
<xsl:attribute name="id">
<xsl:text>img-</xsl:text>
<xsl:value-of select="$testsId" />
</xsl:attribute>
</img>
<xsl:value-of select="@name"/>
</span>
</td>
<td class="col2">
<xsl:apply-templates select="." mode="graph"/>
</td>
<td class="col3">
<xsl:call-template name="GetTests">
<xsl:with-param name="CurrentSuite" select="." />
</xsl:call-template>
</td>
</tr>
<tr>
<xsl:attribute name="id">
<xsl:value-of select="$testsId" />
</xsl:attribute>
<xsl:attribute name="style">
<xsl:text>display:none;</xsl:text>
</xsl:attribute>
<td colspan="3">
<xsl:apply-templates select="." mode="tests" />
</td>
</tr>
</xsl:for-each>
</table>
</div>
</xsl:for-each>
</div>
</xsl:template>
<!-- Template for a particular TestFixture -->
<xsl:template match="test-suite[results/test-case]" mode="tests">
<table class="testTable">
<xsl:for-each select="results/test-case[@success='False']">
<xsl:sort select="@name" order="ascending" data-type="text"/>
<xsl:apply-templates select="." mode="test" />
</xsl:for-each>
<xsl:for-each select="results/test-case[@executed='False']">
<xsl:sort select="@name" order="ascending" data-type="text"/>
<xsl:apply-templates select="." mode="test" />
</xsl:for-each>
<xsl:for-each select="results/test-case[@success='True']">
<xsl:sort select="@name" order="ascending" data-type="text"/>
<xsl:apply-templates select="." mode="test" />
</xsl:for-each>
</table>
</xsl:template>
<!-- Writes a line in the table for a particular test -->
<xsl:template match="results/test-case" mode="test">
<tr>
<xsl:attribute name="class">
<xsl:call-template name="GetClass">
<xsl:with-param name="Executed" select="@executed" />
<xsl:with-param name="Succeeded" select="@success" />
</xsl:call-template>
</xsl:attribute>
<td class="testName">
<xsl:call-template name="GetImage">
<xsl:with-param name="Executed" select="@executed" />
<xsl:with-param name="Succeeded" select="@success" />
</xsl:call-template>
<xsl:text>&#0160;</xsl:text>
<xsl:call-template name="GetTestName">
<xsl:with-param name="Name" select="@name"/>
</xsl:call-template>
<xsl:if test="categories">
<xsl:for-each select="categories/category">
<div class="category">
<xsl:text>[</xsl:text>
<xsl:value-of select="@name"/>
<xsl:text>]</xsl:text>
</div>
</xsl:for-each>
</xsl:if>
</td>
<td class="testMsg">
<xsl:value-of select=".//message" />
<xsl:if test=".//stack-trace">
<br/>
<div style="margin-top: 5px;">
<xsl:value-of select=".//stack-trace" />
</div>
</xsl:if>
</td>
</tr>
</xsl:template>
<!-- Gets the class to use depending upon whether the test passed or failed -->
<xsl:template name="GetClass">
<xsl:param name="Executed" />
<xsl:param name="Succeeded" />
<xsl:choose>
<xsl:when test="$Executed='False'">
<xsl:text>ignored</xsl:text>
</xsl:when>
<xsl:when test="$Executed='True' and $Succeeded='False'">
<xsl:text>failed</xsl:text>
</xsl:when>
<xsl:when test="$Executed='True' and $Succeeded='True'">
<xsl:text>succeeded</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>unknown</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Gets the image tag to show success or failure -->
<xsl:template name="GetImage">
<xsl:param name="Executed" />
<xsl:param name="Succeeded" />
<xsl:choose>
<xsl:when test="$Executed='False'">
<img src="{$applicationPath}/images/fxcop-error.gif" alt="The test wasn't run" width="16" height="16" />
</xsl:when>
<xsl:when test="$Executed='True' and $Succeeded='False'">
<img src="{$applicationPath}/images/fxcop-critical-error.gif" alt="The test failed" width="16" height="16"/>
</xsl:when>
<xsl:when test="$Executed='True' and $Succeeded='True'">
<img src="{$applicationPath}/images/check.jpg" alt="The test suceeded" width="16" height="16"/>
</xsl:when>
</xsl:choose>
</xsl:template>
<!-- Template to draw a graph for a particular TestFixture -->
<xsl:template match="test-suite[results/test-case]" mode="graph">
<xsl:variable name="numTests">
<xsl:call-template name="GetNumberOfTests">
<xsl:with-param name="CurrentSuite" select="." />
</xsl:call-template>
</xsl:variable>
<xsl:for-each select="results/test-case">
<xsl:sort select="@executed" order="descending" data-type="text"/>
<xsl:sort select="@success" order="descending" data-type="text" />
<div>
<xsl:attribute name="style">
<xsl:text>width:</xsl:text>
<xsl:value-of select="(350 - ($numTests * 2)) div $numTests"/>
<xsl:text>px;</xsl:text>
</xsl:attribute>
<xsl:attribute name="class">
<xsl:call-template name="GetClass">
<xsl:with-param name="Executed" select="@executed"/>
<xsl:with-param name="Succeeded" select="@success"/>
</xsl:call-template>
</xsl:attribute>
<xsl:text>&#0160;</xsl:text>
</div>
</xsl:for-each>
</xsl:template>
<!-- Calculates the total number of tests in a particular testfixture -->
<xsl:template name="GetNumberOfTests">
<xsl:param name="CurrentSuite" />
<xsl:value-of select="count($CurrentSuite/results/test-case)"/>
</xsl:template>
<!-- Gets the text for the third column -->
<xsl:template name="GetTests">
<xsl:param name="CurrentSuite" />
<xsl:text>(</xsl:text>
<xsl:value-of select="count($CurrentSuite/results/test-case[@success='True'])"/>
<xsl:text>/</xsl:text>
<xsl:value-of select="count($CurrentSuite/results/test-case)"/>
<xsl:text>)</xsl:text>
</xsl:template>
<!-- Takes a full path and returns the filename -->
<xsl:template name="getSuiteName">
<xsl:param name="name"/>
<xsl:choose>
<xsl:when test="contains($name, '\')">
<xsl:call-template name="getSuiteName">
<xsl:with-param name="name" select="substring-after($name, '\')"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="contains($name, '/')">
<xsl:call-template name="getSuiteName">
<xsl:with-param name="name" select="substring-after($name, '/')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$name"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Takes a fully qualified test name and returns just the name of the test -->
<xsl:template name="GetTestName">
<xsl:param name="Name"/>
<xsl:choose>
<xsl:when test="contains($Name, '.')">
<xsl:call-template name="GetTestName">
<xsl:with-param name="Name" select="substring-after($Name, '.')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$Name"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,102 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
<xsl:output method="html" indent="no"/>
<xsl:template match="/cruisecontrol">
<style>
.fullTable { width: 100%; }
.cpu {}
.wallClock { display: none; }
.treeItem { margin-left: 14px; }
.itemTitle { cursor: pointer; }
.itemData { font-style:italic; }
.itemOpen { padding-left: 14px; background-image:url(<xsl:value-of select="applicationPath"/>/images/minus.png); background-repeat:no-repeat; background-position:center left; }
.itemClosed { padding-left: 14px; background-image:url(<xsl:value-of select="applicationPath"/>/images/plus.png); background-repeat:no-repeat; background-position:center left; }
#commands div { display:inline; }
</style>
<script type="text/javascript">
function switchDisplay(newDisplay, oldDisplay){
jQuery(newDisplay).show();
jQuery(oldDisplay).hide();
}
jQuery(function(){
jQuery('table.SortableGrid').initialiseProjectGrid({
sortList: [[0,0], [1, 0]]
});
jQuery('#cpu').change(function(){
switchDisplay('.cpu', '.wallClock');
});
jQuery('#wallClock').change(function(){
switchDisplay('.wallClock', '.cpu');
});
jQuery('div.itemToggle').click(function(){
jQuery(this).toggleClass('itemOpen').toggleClass('itemClosed').next().toggle();
});
});
</script>
<h1>ANTS Performance: Call Tree</h1>
<div id="commands">
<div>
<input type="radio" name="clockType" id="cpu" checked="checked"/>
<label for="cpu">CPU Time</label>
</div>
<div>
<input type="radio" name="clockType" id="wallClock"/>
<label for="wallClock">Wall Clock Time</label>
</div>
</div>
<xsl:apply-templates select="build/PerformanceData[CallTree]">
<xsl:sort select="CreationTime"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="PerformanceData">
<br/>
<xsl:apply-templates select="CallTree/Method[@has-source]"/>
</xsl:template>
<xsl:template match="Method">
<div class="itemOpen itemToggle">
<div class="itemTitle">
<xsl:value-of select="@class"/>.<xsl:value-of select="@name"/>(<xsl:value-of select="@parameters"/>)
</div>
</div>
<div class="treeItem">
<div class="itemData">
<div>
Hit count: <xsl:value-of select="HitCount"/>
</div>
<div>
Time:
<span class="cpu">
<xsl:value-of select="format-number(number(substring(CPU/@time, 0, string-length(CPU/@time) - 2)), '#0.00')"/>ms
</span>
<span class="wallClock">
<xsl:value-of select="format-number(number(substring(WithSelf/@percent-wallclock, 0, string-length(WithSelf/@percent-wallclock) - 2)), '#0.00')"/>ms
</span>
</div>
<div>
Percentage:
<span class="cpu">
<xsl:value-of select="format-number(number(substring(WithSelf/@percent-cpu, 0, string-length(WithSelf/@percent-cpu) - 2)), '#0.00')"/>%
</span>
<span class="wallClock">
<xsl:value-of select="format-number(number(substring(Wallclock/@percent, 0, string-length(Wallclock/@percent) - 2)), '#0.00')"/>%
</span>
</div>
<div>
Percentage (with children):
<span class="cpu">
<xsl:value-of select="format-number(number(substring(CPU/@percent, 0, string-length(CPU/@percent) - 2)), '#0.00')"/>%
</span>
<span class="wallClock">
<xsl:value-of select="format-number(number(substring(Wallclock/@percent, 0, string-length(Wallclock/@percent) - 2)), '#0.00')"/>%
</span>
</div>
</div>
<xsl:apply-templates select="Method[@has-source]"/>
</div>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,102 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
<xsl:output method="html" indent="no"/>
<xsl:template match="/cruisecontrol">
<style>
.numberColumn{ text-align:right !important; width: 13%; }
.fullTable { width: 100%; }
.textColumn { text-align: left !important; width: 24%; }
.cpu {}
.wallClock { display: none; }
#commands div { display:inline; }
</style>
<script type="text/javascript">
function switchDisplay(newDisplay, oldDisplay){
jQuery(newDisplay).show();
jQuery(oldDisplay).hide();
}
jQuery(function(){
jQuery('table.SortableGrid').initialiseProjectGrid({
sortList: [[0,0], [1, 0]]
});
jQuery('#cpu').change(function(){
switchDisplay('.cpu', '.wallClock');
});
jQuery('#wallClock').change(function(){
switchDisplay('.wallClock', '.cpu');
});
});
</script>
<h1>ANTS Performance: All Methods</h1>
<div id="commands">
<div>
<input type="radio" name="clockType" id="cpu" checked="checked"/>
<label for="cpu">CPU Time</label>
</div>
<div>
<input type="radio" name="clockType" id="wallClock"/>
<label for="wallClock">Wall Clock Time</label>
</div>
</div>
<xsl:apply-templates select="build/PerformanceData[AllMethods]">
<xsl:sort select="CreationTime"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="PerformanceData">
<br/>
<table class="fullTable SortableGrid">
<thead>
<tr>
<th>Class</th>
<th>Method</th>
<th>Hit Count</th>
<th class="cpu">Time</th>
<th class="cpu">Percentage</th>
<th class="cpu">Percentage (with children)</th>
<th class="wallClock">Time</th>
<th class="wallClock">Percentage</th>
<th class="wallClock">Percentage (with children)</th>
</tr>
</thead>
<tbody>
<xsl:apply-templates select="AllMethods/Method[@has-source]"/>
</tbody>
</table>
</xsl:template>
<xsl:template match="Method">
<tr>
<td class="textColumn">
<xsl:value-of select="@class"/>
</td>
<td class="textColumn">
<xsl:value-of select="@name"/>(<xsl:value-of select="@parameters"/>)
</td>
<td class="numberColumn">
<xsl:value-of select="number(HitCount)"/>
</td>
<td class="numberColumn cpu">
<xsl:value-of select="format-number(number(substring(CPU/@time, 0, string-length(CPU/@time) - 2)), '#0.00')"/>ms
</td>
<td class="numberColumn cpu">
<xsl:value-of select="format-number(number(substring(WithSelf/@percent-cpu, 0, string-length(WithSelf/@percent-cpu) - 2)), '#0.00')"/>%
</td>
<td class="numberColumn cpu">
<xsl:value-of select="format-number(number(substring(CPU/@percent, 0, string-length(CPU/@percent) - 2)), '#0.00')"/>%
</td>
<td class="numberColumn wallClock">
<xsl:value-of select="format-number(number(substring(WithSelf/@percent-wallclock, 0, string-length(WithSelf/@percent-wallclock) - 2)), '#0.00')"/>ms
</td>
<td class="numberColumn wallClock">
<xsl:value-of select="format-number(number(substring(Wallclock/@percent, 0, string-length(Wallclock/@percent) - 2)), '#0.00')"/>%
</td>
<td class="numberColumn wallClock">
<xsl:value-of select="format-number(number(substring(Wallclock/@percent, 0, string-length(Wallclock/@percent) - 2)), '#0.00')"/>%
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
<xsl:output method="html" indent="no"/>
<xsl:template match="/cruisecontrol">
<style>
.numberColumn{ text-align:right !important; width: 13%; }
.fullTable { width: 100%; }
.textColumn { text-align: left !important; width: 24%; }
.cpu {}
.wallClock { display: none; }
</style>
<script type="text/javascript">
function switchDisplay(newDisplay, oldDisplay){
var cols = jQuery(newDisplay);
jQuery(newDisplay).show();
jQuery(oldDisplay).hide();
}
jQuery(function(){
jQuery('table.SortableGrid').initialiseProjectGrid({
sortList: [[0,0], [1, 0]]
});
jQuery('#cpu').change(function(){
switchDisplay('.cpu', '.wallClock');
});
jQuery('#wallClock').change(function(){
switchDisplay('.wallClock', '.cpu');
});
});
</script>
<h1>ANTS Performance: Top Methods</h1>
<div>
<input type="radio" name="clockType" id="cpu" checked="checked"/>
<label for="cpu">CPU Time</label>
</div>
<div>
<input type="radio" name="clockType" id="wallClock"/>
<label for="wallClock">Wall Clock Time</label>
</div>
<xsl:apply-templates select="build/PerformanceData[AllMethods]">
<xsl:sort select="CreationTime"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="PerformanceData">
<br/>
<table class="fullTable SortableGrid">
<thead>
<tr>
<th>Class</th>
<th>Method</th>
<th>Hit Count</th>
<th class="cpu">Time</th>
<th class="cpu">Percentage</th>
<th class="cpu">Percentage (with children)</th>
<th class="wallClock">Time</th>
<th class="wallClock">Percentage</th>
<th class="wallClock">Percentage (with children)</th>
</tr>
</thead>
<tbody>
<xsl:apply-templates select="AllMethods/Method[@has-source]"/>
</tbody>
</table>
</xsl:template>
<xsl:template match="Method">
<tr>
<td class="textColumn">
<xsl:value-of select="@class"/>
</td>
<td class="textColumn">
<xsl:value-of select="@name"/>(<xsl:value-of select="@parameters"/>)
</td>
<td class="numberColumn">
<xsl:value-of select="number(HitCount)"/>
</td>
<td class="numberColumn cpu">
<xsl:value-of select="format-number(number(substring(CPU/@time, 0, string-length(CPU/@time) - 2)), '#0.00')"/>ms
</td>
<td class="numberColumn cpu">
<xsl:value-of select="format-number(number(substring(WithSelf/@percent-cpu, 0, string-length(WithSelf/@percent-cpu) - 2)), '#0.00')"/>%
</td>
<td class="numberColumn cpu">
<xsl:value-of select="format-number(number(substring(CPU/@percent, 0, string-length(CPU/@percent) - 2)), '#0.00')"/>%
</td>
<td class="numberColumn wallClock">
<xsl:value-of select="format-number(number(substring(WithSelf/@percent-wallclock, 0, string-length(WithSelf/@percent-wallclock) - 2)), '#0.00')"/>ms
</td>
<td class="numberColumn wallClock">
<xsl:value-of select="format-number(number(substring(Wallclock/@percent, 0, string-length(Wallclock/@percent) - 2)), '#0.00')"/>%
</td>
<td class="numberColumn wallClock">
<xsl:value-of select="format-number(number(substring(Wallclock/@percent, 0, string-length(Wallclock/@percent) - 2)), '#0.00')"/>%
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
+190
View File
@@ -0,0 +1,190 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
<xsl:param name="applicationPath"/>
<xsl:output method="html" indent="no"/>
<xsl:template match="/">
<style>
table.cir-solution tr th
{
text-align: left;
}
tr.cir-violation td
{
color: #2E8A2E;
text-align: left;
cursor:pointer;
}
tr.cir-violation td.right{
text-align: right;
}
.cir-hidden{
display:none;
}
tr.cir-CriticalError td.cir-icon, tr.cir-Error td.cir-icon{
background-image:url(<xsl:value-of select="applicationPath"/>/images/error.png);
background-repeat:no-repeat;
background-position:center left;
}
tr.cir-CriticalWarning td.cir-icon, tr.cir-Warning td.cir-icon{
background-image:url(<xsl:value-of select="applicationPath"/>/images/warning.png);
background-repeat:no-repeat;
background-position:center left;
}
tr.cir-violation td.cir-icon{
padding-left: 18px;
}
</style>
<script type="text/javascript">
function showHideSeverity(severity){
jQuery('#show' + severity).change(function(){
var show = jQuery('#show' + severity + ':checked').val();
if (show){
jQuery('tr.cir-violation.cir-' + severity).show();
}else{
jQuery('tr.cir-' + severity).hide();
}
});
}
jQuery(function(){
jQuery('table.SortableGrid').initialiseProjectGrid({
sortList: [[0,0], [1, 0]]
});
jQuery('tr.cir-violation td').click(function(){
jQuery(this).parent().next().toggle();
});
showHideSeverity('CriticalError');
showHideSeverity('Error');
showHideSeverity('CriticalWarning');
showHideSeverity('Warning');
showHideSeverity('Information');
});
</script>
<xsl:for-each select="/cruisecontrol/build/CodeItRightReport">
<h2>CodeIt.Right Analysis Report</h2>
<table class="cir-solution">
<tr>
<td>
<input type="checkbox" id="showCriticalError" checked="checked"/>
<label for="showCriticalError">Critical Errors</label>
</td>
<td>
<input type="checkbox" id="showError" checked="checked"/>
<label for="showError">Errors</label>
</td>
<td>
<input type="checkbox" id="showCriticalWarning" checked="checked"/>
<label for="showCriticalWarning">Critical Warnings</label>
</td>
<td>
<input type="checkbox" id="showWarning" checked="checked"/>
<label for="showWarning">Warnings</label>
</td>
<td>
<input type="checkbox" id="showInformation" checked="checked"/>
<label for="showInformation">Information</label>
</td>
</tr>
</table>
<xsl:apply-templates select="Violations">
<xsl:sort order="ascending" select="@date"/>
</xsl:apply-templates>
</xsl:for-each>
</xsl:template>
<xsl:template match="Violations">
<table class="cir-solution">
<tr>
<th>
Solution:
</th>
<td>
<xsl:value-of select="@solution"/>
</td>
</tr>
<tr>
<th>
Analysis Date/Time:
</th>
<td>
<xsl:value-of select="@date"/>
</td>
</tr>
</table>
<table class="SortableGrid">
<thead>
<tr>
<th>Project</th>
<th>File</th>
<th>Item</th>
<th>Line #</th>
<th>Type</th>
<th>Violation</th>
<th>Category</th>
<th>Severity</th>
</tr>
</thead>
<tbody>
<xsl:apply-templates select="Violation"/>
</tbody>
</table>
</xsl:template>
<xsl:template match="Violation">
<tr>
<xsl:attribute name="id">projectData<xsl:value-of select="position()"/></xsl:attribute>
<xsl:attribute name="class">cir-violation cir-<xsl:value-of select="Severity"/></xsl:attribute>
<td class="cir-icon">
<xsl:value-of select="ProjectName"/>
</td>
<td>
<xsl:value-of select="FileName"/>
</td>
<td>
<xsl:value-of select="ItemName"/>
</td>
<td class="right">
<xsl:value-of select="LineNumber"/>
</td>
<td>
<xsl:value-of select="ItemType"/>
</td>
<td>
<xsl:value-of select="Title"/>
</td>
<td>
<xsl:value-of select="RuleCategory"/>
</td>
<td>
<xsl:value-of select="Severity"/>
</td>
</tr>
<tr>
<xsl:attribute name="id">link<xsl:value-of select="position()"/></xsl:attribute>
<xsl:attribute name="class">buildStatus cir-hidden cir-<xsl:value-of select="Severity"/></xsl:attribute>
<td colspan="8">
<div>
<b>
<xsl:value-of select="@ruleID"/>: <xsl:value-of select="Name"/>
</b>
</div>
<div>
<xsl:value-of select="ViolationDescription"/>
</div>
<div>
Corrections:
</div>
<ol>
<xsl:for-each select="CorrectDescriptions/CorrectDescription">
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ol>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
<xsl:output method="html" indent="no"/>
<xsl:key name="projects" match="Violation" use="ProjectName"/>
<xsl:template match="/">
<style>
table.header tr th
{
text-align: left;
}
table.details
{
width: 100%;
border-collapse:collapse;
}
table.details tr th
{
background-color:#2E8A2E;
color:#ffffff;
}
tr.violation td
{
color: #2E8A2E;
}
td.number
{
width:15%;
text-align:right;
}
</style>
<xsl:for-each select="/cruisecontrol/build/CodeItRightReport">
<h3>CodeIt.Right Analysis Summary</h3>
<xsl:apply-templates select="Violations">
<xsl:sort order="ascending" select="@date"/>
</xsl:apply-templates>
</xsl:for-each>
</xsl:template>
<xsl:template match="Violations">
<table class="header">
<tr>
<th>
Solution:
</th>
<td>
<xsl:value-of select="@solution"/>
</td>
</tr>
</table>
<table class="details">
<tr>
<th>Project</th>
<th>Errors</th>
<th>Warnings</th>
<th>Other</th>
<th>Total</th>
</tr>
<xsl:for-each select="Violation[generate-id() = generate-id(key('projects', ProjectName)[1])]">
<xsl:sort select="ProjectName"/>
<xsl:variable name="total">
<xsl:value-of select="count(key('projects', ProjectName))" />
</xsl:variable>
<xsl:variable name="errors">
<xsl:value-of select="count(key('projects', ProjectName)[Severity='Error'])+count(key('projects', ProjectName)[Severity='CriticalError'])" />
</xsl:variable>
<xsl:variable name="warnings">
<xsl:value-of select="count(key('projects', ProjectName)[Severity='Warning'])+count(key('projects', ProjectName)[Severity='CriticalWarning'])" />
</xsl:variable>
<tr>
<td>
<xsl:value-of select="ProjectName"/>
</td>
<td class="number">
<xsl:value-of select="$errors"/>
</td>
<td class="number">
<xsl:value-of select="$warnings"/>
</td>
<td class="number">
<xsl:value-of select="$total - $errors - $warnings"/>
</td>
<td class="number">
<xsl:value-of select="$total"/>
</td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
+599
View File
@@ -0,0 +1,599 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="applicationPath" />
<!--
format a number in to display its value in percent
@param value the number to format
-->
<xsl:template name="display-time-second">
<xsl:param name="value"/>
<span class="time"><xsl:value-of select="format-number($value,'0.00')"/>s</span>
</xsl:template>
<!--
format a number in to display its value in percent
@param value the number to format
-->
<xsl:template name="display-time">
<xsl:param name="value"/>
<span class="time"><xsl:value-of select="format-number($value*1000,'0.000')"/>ms</span>
</xsl:template>
<!--
format a number in to display its value in percent
@param value the number to format
-->
<xsl:template name="display-percent">
<xsl:param name="value"/>
<xsl:value-of select="format-number($value,'0.00 %')"/>
</xsl:template>
<!--
format a number in to display its value in Kb
@param value the number to format
-->
<xsl:template name="display-memory">
<xsl:param name="value"/>
<xsl:variable name="kbvalue">
<xsl:value-of select="$value * 0.0001"/>
</xsl:variable>
<xsl:value-of select="format-number($kbvalue,'0.00 Kb')"/>
</xsl:template>
<!--
template that will convert a carriage return into a br tag
@param word the text from which to convert CR to BR tag
-->
<xsl:template name="br-replace">
<xsl:param name="word"/>
<xsl:choose>
<xsl:when test="contains($word,'&#xA;')">
<xsl:value-of select="substring-before($word,'&#xA;')"/>
<br/>
<xsl:call-template name="br-replace">
<xsl:with-param name="word" select="substring-after($word,'&#xA;')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$word"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--
Scales value
-->
<xsl:template name="scale">
<xsl:param name="origLength"/>
<xsl:param name="targetLength"/>
<xsl:param name="value"/>
<xsl:value-of select="($value div $origLength) * $targetLength"/>
</xsl:template>
<!--
Graphical result bar
-->
<xsl:template name="counter-progressbar">
<xsl:param name="width"/>
<xsl:param name="height"/>
<div>
<xsl:attribute name="style">position:relative;background-color:#DDDDDD;border-color:black;width:<xsl:value-of select="$width"/>px;height:<xsl:value-of select="$height"/>px;</xsl:attribute>
<!-- success -->
<xsl:if test="@success-count > 0">
<div>
<xsl:attribute name="style">position:absolute;top:0px;left:0px;height:<xsl:value-of select="$height"/>px;background-color:lightgreen;font-size:1px;width:<xsl:call-template name="scale">
<xsl:with-param name="origLength" select="@run-count"/>
<xsl:with-param name="targetLength" select="$width"/>
<xsl:with-param name="value" select="@success-count"/>
</xsl:call-template>px;</xsl:attribute>
</div>
</xsl:if>
<!-- failure -->
<xsl:if test="@failure-count > 0">
<div>
<xsl:attribute name="style">position:absolute;top:0px;left:<xsl:call-template name="scale">
<xsl:with-param name="origLength" select="@run-count"/>
<xsl:with-param name="targetLength" select="$width"/>
<xsl:with-param name="value" select="@success-count"/>
</xsl:call-template>px;height:<xsl:value-of select="$height"/>px;background-color:red;font-size:1px;width:<xsl:call-template name="scale">
<xsl:with-param name="origLength" select="@run-count"/>
<xsl:with-param name="targetLength" select="$width"/>
<xsl:with-param name="value" select="@failure-count"/>
</xsl:call-template>px;</xsl:attribute>
</div>
</xsl:if>
<!-- skip -->
<xsl:if test="@skip-count > 0">
<div>
<xsl:attribute name="style">position:absolute;top:0px;left:<xsl:call-template name="scale">
<xsl:with-param name="origLength" select="@run-count"/>
<xsl:with-param name="targetLength" select="$width"/>
<xsl:with-param name="value" select="@success-count+@failure-count"/>
</xsl:call-template>px;height:<xsl:value-of select="$height"/>px;background-color:blueviolet;font-size:1px;width:<xsl:call-template name="scale">
<xsl:with-param name="origLength" select="@run-count"/>
<xsl:with-param name="targetLength" select="$width"/>
<xsl:with-param name="value" select="@skip-count"/>
</xsl:call-template>px;</xsl:attribute>
</div>
</xsl:if>
<!-- ignore -->
<xsl:if test="@ignore-count > 0">
<div>
<xsl:attribute name="style">position:absolute;top:0px;left:<xsl:call-template name="scale">
<xsl:with-param name="origLength" select="@run-count"/>
<xsl:with-param name="targetLength" select="$width"/>
<xsl:with-param name="value" select="@success-count+@failure-count+@skip-count"/>
</xsl:call-template>px;height:<xsl:value-of select="$height"/>px;background-color:orange;font-size:1px;width:<xsl:call-template name="scale">
<xsl:with-param name="origLength" select="@run-count"/>
<xsl:with-param name="targetLength" select="$width"/>
<xsl:with-param name="value" select="@ignore-count"/>
</xsl:call-template>px;</xsl:attribute>
</div>
</xsl:if>
<div>
<xsl:attribute name="style">position:absolute;top:0px;left:<xsl:value-of select="$width +2"/>px;height:<xsl:value-of select="$height"/>px;font-size:<xsl:value-of select="$height - 2"/>px;font-family:Verdana;</xsl:attribute><xsl:value-of select="@run-count"/>/<xsl:value-of select="@success-count"/>/<xsl:value-of select="@failure-count"/>/<xsl:value-of select="@skip-count"/>/<xsl:value-of select="@ignore-count"/>/<xsl:value-of select="@assert-count"/></div>
</div>
</xsl:template>
<xsl:template name="counter-literal">
<xsl:value-of select="@run-count"/> test,
<xsl:value-of select="@success-count"/> success,
<xsl:value-of select="@failure-count"/> failures,
<xsl:value-of select="@skip-count" /> skipped,
<xsl:value-of select="@ignore-count"/> ignored,
<xsl:value-of select="@assert-count"/> asserts
</xsl:template>
<xsl:template name="icon">
<xsl:param name="src"/>
<img width="16" height="16" border="0">
<xsl:attribute name="src"><xsl:value-of select="$src"/></xsl:attribute>
</img>
</xsl:template>
<xsl:template name="assembly-icon">
<xsl:call-template name="icon">
<xsl:with-param name="src">
<xsl:value-of select="$applicationPath" />/images/Populator.png</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="fixture-icon">
<xsl:call-template name="icon">
<xsl:with-param name="src">
<xsl:value-of select="$applicationPath" />/images/Fixture.png</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="namespace-icon">
<xsl:call-template name="icon">
<xsl:with-param name="src">
<xsl:value-of select="$applicationPath" />/images/Category.png</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="run-icon">
<xsl:call-template name="icon">
<xsl:with-param name="src">
<xsl:value-of select="$applicationPath" />/images/Test.png</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="assemblyid">
<xsl:param name="name"/>
as<xsl:value-of select="$name"/>
</xsl:template>
<xsl:template name="exceptionid">
<xsl:param name="name"/>
ex<xsl:value-of select="$name"/>
</xsl:template>
<!--
MbUnit main method.
-->
<xsl:template match="/">
<div id="mbunit">
<script>function ToggleVisible(blockId) {
var block = document.all.item(blockId);
var plus = document.all.item(blockId + '.plus');
if (block.style.display=='none') {
block.style.display='block';
plus.innerText='- ';
} else {
block.style.display='none';
plus.innerText='+ ';
}
}
</script>
<xsl:apply-templates select="//report-result" />
</div>
</xsl:template>
<xsl:template match="report-result">
<table cellpadding="2" cellspacing="0" border="0" width="98%">
<tr>
<td class="unittests-sectionheader" colspan="3">
MbUnit Tests run:
<xsl:value-of select="counter/@run-count" /> tests,
<xsl:value-of select="counter/@success-count" /> success,
<xsl:value-of select="counter/@failure-count" /> failure,
<xsl:value-of select="counter/@ignore-count" /> ignored,
<xsl:value-of select="counter/@skip-count" /> skipped,
<xsl:value-of select="format-number(counter/@duration,'##.##')" /> s
</td>
</tr>
<tr>
<td>
<xsl:call-template name="report-summary" />
<xsl:if test="count(//warnings)>0">
<br/>
<xsl:call-template name="warnings" />
</xsl:if>
<br/>
<xsl:call-template name="assemblies" />
</td>
</tr>
</table>
</xsl:template>
<xsl:template name="report-summary">
<table border="0" cellpadding="1" cellspacing="1">
<tr class="titles">
<td>Total</td>
<td>
<xsl:for-each select="counter">
<xsl:call-template name="counter-progressbar">
<xsl:with-param name="width">100</xsl:with-param>
<xsl:with-param name="height">14</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</td>
</tr>
<xsl:call-template name="assembly-summary"/>
</table>
</xsl:template>
<xsl:template name="assembly-summary">
<xsl:for-each select="//assemblies/assembly">
<tr class="titles">
<td>
<a>
<xsl:attribute name="href">#<xsl:value-of select="@name"/>Assembly</xsl:attribute>
<xsl:call-template name="assembly-icon"/>
<xsl:value-of select="@name"/>
</a>
</td>
<td>
<xsl:for-each select="counter">
<xsl:call-template name="counter-progressbar">
<xsl:with-param name="width">100</xsl:with-param>
<xsl:with-param name="height">12</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</td>
</tr>
<xsl:call-template name="fixture-summary" />
</xsl:for-each>
</xsl:template>
<xsl:template name="fixture-id"><xsl:param name="name" /><xsl:value-of select="$name" /></xsl:template>
<xsl:template name="fixture-summary">
<xsl:for-each select="descendant::fixture">
<tr class="fixtureSummary">
<td>
<a>
<xsl:attribute name="href">#<xsl:call-template name="fixture-id"><xsl:with-param name="name">
<xsl:value-of select="@type" />.<xsl:value-of select="@name" />
</xsl:with-param></xsl:call-template>
</xsl:attribute>
<xsl:call-template name="fixture-icon"/>
<xsl:value-of select="@type" />.<xsl:value-of select="@name" />
</a>
</td>
<td>
<xsl:for-each select="counter">
<xsl:call-template name="counter-progressbar">
<xsl:with-param name="width">100</xsl:with-param>
<xsl:with-param name="height">10</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</td>
</tr>
</xsl:for-each>
</xsl:template>
<xsl:template name="warnings">
<table>
<xsl:for-each select="//warning">
<tr>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="position() mod 2 = 1">failureOdd</xsl:when>
<xsl:otherwise>failureEven</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<td><xsl:call-template name="run-icon"/>
<xsl:value-of select="ancestor::run/@name" /></td>
<td><xsl:value-of select="text()"/></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template name="assemblies">
<xsl:for-each select="assemblies/assembly">
<xsl:call-template name="assembly-detail" />
</xsl:for-each>
</xsl:template>
<xsl:template name="assembly-detail">
<h2><xsl:attribute name="id"><xsl:value-of select="@name"/>Assembly</xsl:attribute>
<xsl:call-template name="assembly-icon"/>
<xsl:value-of select="@name"/>
</h2>
<ul>
<li><strong>Full Name:</strong> <xsl:value-of select="@full-name"/></li>
<li><strong>Results:</strong>
<xsl:for-each select="counter">
<xsl:call-template name="counter-literal"/>
</xsl:for-each>
</li>
<li><strong>Duration:</strong>
<xsl:call-template name="display-time-second">
<xsl:with-param name="value" select="counter/@duration"/>
</xsl:call-template>
</li>
</ul>
<xsl:if test="set-up|tear-down">
<table>
<tr class="assemblysetupteardown" ><td>Assembly SetUp and TearDown</td></tr>
<xsl:apply-templates select="set-up"/>
<xsl:apply-templates select="tear-down"/>
</table>
</xsl:if>
<xsl:call-template name="namespaces-table" />
</xsl:template>
<xsl:template name="namespaces-table">
<xsl:apply-templates select="namespaces" />
<xsl:apply-templates select="namespace" />
</xsl:template>
<xsl:template match="namespaces">
<xsl:apply-templates select="namespace" />
</xsl:template>
<xsl:template match="namespace">
<xsl:apply-templates select="namespaces" />
<xsl:apply-templates select="fixtures" />
</xsl:template>
<xsl:template match="fixtures">
<table width="800" border="0" cellpadding="1" cellspacing="1">
<col width="700"/>
<col width="50"/>
<col width="50"/>
<xsl:apply-templates select="fixture" />
</table>
</xsl:template>
<xsl:template match="fixture">
<tr>
<xsl:attribute name="id"><xsl:call-template name="fixture-id"><xsl:with-param name="name">
<xsl:value-of select="@type" />.<xsl:value-of select="@name" />
</xsl:with-param></xsl:call-template>
</xsl:attribute>
<td>
<xsl:for-each select="counter">
<xsl:call-template name="counter-progressbar">
<xsl:with-param name="width" select="100" />
<xsl:with-param name="height" select="10" />
</xsl:call-template>
</xsl:for-each>
</td>
</tr>
<tr class="fixture" >
<td>
<xsl:call-template name="fixture-icon"/>
<xsl:value-of select="@type" />.<xsl:value-of select="@name"/>
(<xsl:call-template name="display-time-second">
<xsl:with-param name="value" select="counter/@duration"/>
</xsl:call-template>)
</td>
</tr>
<xsl:if test="set-up|tear-down">
<tr class="fixturesetupteardown"><td>Fixture SetUp and TearDown</td></tr>
<xsl:apply-templates select="set-up"/>
<xsl:apply-templates select="tear-down"/>
</xsl:if>
<tr>
<td>
<xsl:apply-templates select="runs" />
</td>
</tr>
</xsl:template>
<xsl:template match="runs">
<table width="100%" border="0" cellpadding="1" cellspacing="1">
<xsl:apply-templates select="*" />
</table>
</xsl:template>
<xsl:template match="set-up">
<xsl:call-template name="set-up-or-tear-down" />
</xsl:template>
<xsl:template match="tear-down">
<xsl:call-template name="set-up-or-tear-down" />
</xsl:template>
<xsl:template name="set-up-or-tear-down">
<tr>
<!-- Choosing style and alternate -->
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="@result = 'success'">successEven</xsl:when>
<xsl:when test="@result = 'failure'">failureEven</xsl:when>
</xsl:choose>
</xsl:attribute>
<td>
<xsl:value-of select="@name"/>
</td>
<td>
<xsl:call-template name="display-time">
<xsl:with-param name="value" select="@duration"/>
</xsl:call-template>
</td>
<td>
<xsl:call-template name="display-memory">
<xsl:with-param name="value" select="@memory"/>
</xsl:call-template>
</td>
</tr>
<!-- Adding execption log -->
<xsl:if test="@result = 'failure'">
<xsl:call-template name="exception-log"/>
</xsl:if>
<!-- Adding console out, error -->
<xsl:call-template name="console-output" />
</xsl:template>
<!--
Run template
-->
<xsl:template match="run">
<tr>
<!-- Choosing style and alternate -->
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="@result = 'success'">
<xsl:choose>
<xsl:when test="position() mod 2 = 1">successOdd</xsl:when>
<xsl:otherwise>successEven</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="@result = 'failure'">
<xsl:choose>
<xsl:when test="position() mod 2 = 1">failureOdd</xsl:when>
<xsl:otherwise>failureEven</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="@result = 'skip'">
<xsl:choose>
<xsl:when test="position() mod 2 = 1">skippedOdd</xsl:when>
<xsl:otherwise>skippedEven</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="@result = 'ignore'">
<xsl:choose>
<xsl:when test="position() mod 2 = 1">ignoreOdd</xsl:when>
<xsl:otherwise>ignoreEvent</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:attribute>
<td>
<xsl:call-template name="run-icon"/>
<xsl:value-of select="@name"/>
</td>
<td>
<xsl:call-template name="display-time">
<xsl:with-param name="value" select="@duration"/>
</xsl:call-template>
</td>
<td>
<xsl:call-template name="display-memory">
<xsl:with-param name="value" select="@memory"/>
</xsl:call-template>, <xsl:value-of select="@assert-count" />
</td>
</tr>
<!-- Adding execption log -->
<xsl:if test="@result = 'failure'">
<xsl:call-template name="exception-log"/>
</xsl:if>
<!-- Adding console out, error -->
<xsl:call-template name="console-output" />
</xsl:template>
<xsl:template name="exception-log">
<tr class="failure-exception">
<td>
<div style="display;">
<table border="0" cellpadding="1" cellspacing="1" width="600">
<xsl:apply-templates select="exception" />
</table>
</div>
</td>
</tr>
</xsl:template>
<xsl:template match="exception">
<tr class="exceptionType">
<td>
<strong>Type:</strong>
<xsl:value-of select="@type"/>
</td>
</tr>
<tr>
<td>
<strong>Message:</strong>
<xsl:value-of select="message"/>
</td>
</tr>
<tr>
<td>
<strong>Source:</strong>
<xsl:value-of select="source"/>
</td>
</tr>
<xsl:for-each select="properties/property">
<tr>
<td>
<bold><xsl:value-of select="@name"/>:</bold>
<xsl:value-of select="@value"/>
</td>
</tr>
</xsl:for-each>
<tr>
<td width="80">
<strong>StackTrace:</strong>
<br/>
<pre class="stackTrace" width="80">
<xsl:value-of select="stack-trace"/>
</pre>
</td>
</tr>
<xsl:apply-templates select="exception" />
</xsl:template>
<xsl:template name="console-output">
<xsl:apply-templates select="console-out"/>
<xsl:apply-templates select="console-error"/>
</xsl:template>
<xsl:template match="console-out">
<xsl:call-template name="console">
<xsl:with-param name="name">Console Output</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="console-error">
<xsl:call-template name="console">
<xsl:with-param name="name">Console Error</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="console">
<xsl:param name="name" />
<xsl:if test="string-length( text() ) != 0">
<tr>
<td>
<table>
<tr><td><strong><xsl:value-of select="$name"/></strong></td></tr>
<tr>
<td>
<pre class="console"><xsl:value-of select="text()"/></pre>
</td>
</tr>
</table>
</td>
</tr>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
+260
View File
@@ -0,0 +1,260 @@
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:variable name="nunit2.result.list" select="//report-result/counter"/>
<xsl:variable name="nunit2.testcount" select="sum($nunit2.result.list/@run-count)"/>
<xsl:variable name="nunit2.failures" select="sum($nunit2.result.list/@failure-count)"/>
<xsl:variable name="nunit2.notrun" select="sum($nunit2.result.list/@skip-count)"/>
<xsl:variable name="nunit2.time" select="sum($nunit2.result.list/@duration)"/>
<xsl:variable name="nunit2.case.list" select="//report-result/assemblies/assembly/namespaces/namespace/fixtures/fixture"/>
<xsl:variable name="nunit2.suite.list" select="//report-result/assemblies/assembly/namespaces/namespace/fixtures/fixture/runs/run"/>
<xsl:variable name="nunit2.failure.list" select="//report-result/assemblies/assembly/namespaces/namespace/fixtures/fixture/runs/run/exception"/>
<xsl:variable name="nunit2.notrun.list" select="$nunit2.case.list//reason"/>
<xsl:variable name="testsuite.list" select="/cruisecontrol/build/buildresults//testsuite"/>
<xsl:variable name="testcase.list" select="$testsuite.list/testcase"/>
<xsl:variable name="testcase.error.list" select="$testcase.list/error"/>
<xsl:variable name="testsuite.error.count" select="count($testcase.error.list)"/>
<xsl:variable name="testcase.failure.list" select="$testcase.list/failure"/>
<!--<xsl:variable name="totalErrorsAndFailures" select="count($testcase.error.list) + count($testcase.failure.list) + count($nunit2.failure.list)"/>-->
<xsl:variable name="totalErrorsAndFailures" select="sum($nunit2.result.list/@failure-count)"/>
<xsl:template match="/">
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<!-- Unit Tests -->
<tr>
<td class="unittests-sectionheader" colspan="2">
Tests run: <xsl:value-of select="$nunit2.testcount"/>, Failures: <xsl:value-of select="$nunit2.failures"/>, Not run: <xsl:value-of select="$nunit2.notrun"/>, Time: <xsl:value-of select="$nunit2.time"/> seconds
</td>
</tr>
<xsl:choose>
<xsl:when test="$nunit2.testcount = 0">
<tr><td colspan="2" class="unittests-data">No Tests Run</td></tr>
<tr><td colspan="2" class="unittests-error">This project doesn't have any tests</td></tr>
</xsl:when>
<xsl:when test="$totalErrorsAndFailures = 0">
<tr><td colspan="2" class="unittests-data">All Tests Passed</td></tr>
</xsl:when>
</xsl:choose>
<!--<xsl:apply-templates select="$testcase.error.list"/>
<xsl:apply-templates select="$testcase.failure.list | $nunit2.failure.list"/>
<xsl:apply-templates select="$nunit2.notrun.list"/>-->
<tr><td colspan="2"> </td></tr>
<xsl:if test="$totalErrorsAndFailures > 0">
<tr>
<td class="unittests-sectionheader" colspan="2">
Unit Test Failure and Error Details (<xsl:value-of select="$totalErrorsAndFailures"/>)
</td>
</tr>
<!--<xsl:call-template name="nunit2testdetail">
<xsl:with-param name="detailnodes" select="$nunit2.suite.list"/>
</xsl:call-template>-->
<xsl:call-template name="nunit2testdetail">
<xsl:with-param name="detailnodes" select="//report-result/assemblies/assembly//namespaces//namespace/fixtures/fixture/runs/run"/>
</xsl:call-template>
<tr><td colspan="2"> </td></tr>
</xsl:if>
<xsl:if test="$nunit2.notrun > 0">
<tr>
<td class="unittests-sectionheader" colspan="2">
Warning Details (<xsl:value-of select="$nunit2.notrun"/>)
</td>
</tr>
<!-- (PENDING) Why doesn't this work if set up as variables up top? -->
<xsl:call-template name="nunit2testdetail">
<xsl:with-param name="detailnodes" select="//test-suite/results/test-case[.//reason]"/>
</xsl:call-template>
<tr><td colspan="2"> </td></tr>
</xsl:if>
</table>
</xsl:template>
<!-- UnitTest Errors -->
<xsl:template match="error">
<tr>
<xsl:if test="position() mod 2 = 0">
<xsl:attribute name="class">unittests-oddrow</xsl:attribute>
</xsl:if>
<td class="unittests-data">Error</td>
<td class="unittests-data"><xsl:value-of select="../@name"/></td>
</tr>
</xsl:template>
<!-- UnitTest Failures -->
<xsl:template match="failure">
<tr>
<xsl:if test="($testsuite.error.count + position()) mod 2 = 0">
<xsl:attribute name="class">unittests-oddrow</xsl:attribute>
</xsl:if>
<td class="unittests-data">Failure</td>
<td class="unittests-data"><xsl:value-of select="/source"/></td>
</tr>
</xsl:template>
<!-- UnitTest Warnings -->
<xsl:template match="reason">
<tr>
<xsl:if test="($totalErrorsAndFailures + position()) mod 2 = 0">
<xsl:attribute name="class">unittests-oddrow</xsl:attribute>
</xsl:if>
<td class="unittests-data">Warning</td>
<td class="unittests-data"><xsl:value-of select="../@name"/></td>
</tr>
</xsl:template>
<!-- UnitTest Errors And Failures Detail Template -->
<xsl:template name="testdetail">
<xsl:param name="detailnodes"/>
<xsl:for-each select="$detailnodes">
<xsl:if test="position() > 1">
<tr><td colspan="2"><hr size="1" width="100%" color="#888888"/></td></tr>
</xsl:if>
<tr><td class="unittests-data">Test:</td><td class="unittests-data"><xsl:value-of select="@name"/></td></tr>
<xsl:if test="error">
<tr><td class="unittests-data">Type:</td><td class="unittests-data"><xsl:value-of select="error/@type"/></td></tr>
<tr><td class="unittests-data">Message:</td><td class="unittests-data"><xsl:value-of select="error/@message"/></td></tr>
<tr>
<td></td>
<td class="unittests-error">
<pre><xsl:call-template name="br-replace">
<xsl:with-param name="word" select="error"/>
</xsl:call-template></pre>
</td>
</tr>
</xsl:if>
<xsl:if test="failure">
<tr><td class="unittests-data">Type:</td><td class="unittests-data"><xsl:value-of select="failure/@type"/></td></tr>
<tr><td class="unittests-data">Message:</td><td class="unittests-data"><xsl:value-of select="failure/@message"/></td></tr>
<tr>
<td></td>
<td class="unittests-error">
<pre><xsl:call-template name="br-replace">
<xsl:with-param name="word" select="failure"/>
</xsl:call-template></pre>
</td>
</tr>
</xsl:if>
</xsl:for-each>
</xsl:template>
<!-- UnitTest Errors And Failures Detail Template -->
<xsl:template name="nunit2testdetail">
<xsl:param name="detailnodes"/>
<xsl:for-each select="$detailnodes">
<!--<xsl:if test="position() > 1">-->
<!--</xsl:if>-->
<xsl:if test="exception">
<tr><td colspan="2"><hr size="1" width="100%" color="#888888"/></td></tr>
<tr><td class="unittests-data">Test:</td><td class="unittests-data"><xsl:value-of select="@name"/></td></tr>
<tr><td class="unittests-data">Type:</td><td class="unittests-data">Failure</td></tr>
<tr><td class="unittests-data">Message:</td><td class="unittests-data"><xsl:value-of select="exception/message"/></td></tr>
<tr>
<td></td>
<td class="unittests-error">
<pre><xsl:value-of select="exception/stack-trace"/></pre>
</td>
</tr>
</xsl:if>
<xsl:if test="reason">
<tr><td class="unittests-data">Test:</td><td class="unittests-data"><xsl:value-of select="@name"/></td></tr>
<tr><td class="unittests-data">Type:</td><td class="unittests-data">Warning</td></tr>
<tr><td class="unittests-data">Message:</td><td class="unittests-data"><xsl:value-of select="reason//message"/></td></tr>
<tr>
<td></td>
<td class="unittests-error">
<pre><xsl:call-template name="br-replace">
<xsl:with-param name="word" select="/stack-trace"/>
</xsl:call-template></pre>
</td>
</tr>
</xsl:if>
</xsl:for-each>
</xsl:template>
<!-- UnitTest Errors And Failures Detail Template -->
<xsl:template name="nunit2testdetail2">
<xsl:param name="detailnodes"/>
<xsl:for-each select="$detailnodes">
<!--<xsl:if test="position() > 1">-->
<!--</xsl:if>-->
<xsl:if test="exception">
<tr><td colspan="2"><hr size="1" width="100%" color="#888888"/></td></tr>
<tr><td class="unittests-data">Test:</td><td class="unittests-data"><xsl:value-of select="@name"/></td></tr>
<tr><td class="unittests-data">Type:</td><td class="unittests-data">Failure</td></tr>
<tr><td class="unittests-data">Message:</td><td class="unittests-data"><xsl:value-of select="exception/message"/></td></tr>
<tr>
<td></td>
<td class="unittests-error">
<pre><xsl:value-of select="exception/stack-trace"/></pre>
</td>
</tr>
</xsl:if>
<xsl:if test="reason">
<tr><td class="unittests-data">Test:</td><td class="unittests-data"><xsl:value-of select="@name"/></td></tr>
<tr><td class="unittests-data">Type:</td><td class="unittests-data">Warning</td></tr>
<tr><td class="unittests-data">Message:</td><td class="unittests-data"><xsl:value-of select="reason//message"/></td></tr>
<tr>
<td></td>
<td class="unittests-error">
<pre><xsl:call-template name="br-replace">
<xsl:with-param name="word" select="/stack-trace"/>
</xsl:call-template></pre>
</td>
</tr>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template name="br-replace">
<xsl:param name="word"/>
<xsl:variable name="cr"><xsl:text>
<!-- </xsl:text> on next line on purpose to get newline -->
</xsl:text></xsl:variable>
<xsl:choose>
<xsl:when test="contains($word,$cr)">
<xsl:value-of select="substring-before($word,$cr)"/>
<br/>
<xsl:call-template name="br-replace">
<xsl:with-param name="word" select="substring-after($word,$cr)"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$word"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
+83
View File
@@ -0,0 +1,83 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/xhtml1/strict">
<xsl:output method="html"/>
<xsl:template match="/">
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<tr>
<td class="sectionheader" colspan="8">
Microsoft Metrics
</td>
</tr>
<tr>
<th colspan="3">Item</th>
<th>Maintainability Index</th>
<th>Cyclomatic Complexity</th>
<th>Class Coupling</th>
<th>Inheritance Depth</th>
<th>Lines Of Code</th>
</tr>
<xsl:apply-templates select="//CodeMetricsReport/Targets/Target/Modules/Module">
<xsl:sort select="@Name"/>
</xsl:apply-templates>
</table>
</xsl:template>
<xsl:template match="Metrics">
<td>
<xsl:value-of select="Metric[@Name='MaintainabilityIndex']/@Value"/>
</td>
<td>
<xsl:value-of select="Metric[@Name='CyclomaticComplexity']/@Value"/>
</td>
<td>
<xsl:value-of select="Metric[@Name='ClassCoupling']/@Value"/>
</td>
<td>
<xsl:value-of select="Metric[@Name='DepthOfInheritance']/@Value"/>
</td>
<td>
<xsl:value-of select="Metric[@Name='LinesOfCode']/@Value"/>
</td>
</xsl:template>
<xsl:template match="Module">
<tr>
<td colspan="3">
<xsl:value-of select="@Name"/>
</td>
<xsl:apply-templates select="Metrics" />
</tr>
<xsl:apply-templates select="Namespaces/Namespace">
<xsl:sort select="@Name"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="Namespace">
<tr>
<td>
<span style="width:10px;"/>
</td>
<td colspan="2">
<xsl:value-of select="@Name"/>
</td>
<xsl:apply-templates select="Metrics" />
</tr>
<xsl:apply-templates select="Types/Type">
<xsl:sort select="@Name"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="Type">
<tr>
<td>
<span style="width:10px;"/>
</td>
<td>
<span style="width:10px;"/>
</td>
<td>
<xsl:value-of select="@Name"/>
</td>
<xsl:apply-templates select="Metrics" />
</tr>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,44 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/xhtml1/strict">
<xsl:output method="html"/>
<xsl:template match="/">
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<tr>
<td class="sectionheader" colspan="6">
Microsoft Metrics
</td>
</tr>
<tr>
<th>Module</th>
<th>Maintainability Index</th>
<th>Cyclomatic Complexity</th>
<th>Class Coupling</th>
<th>Inheritance Depth</th>
<th>Lines Of Code</th>
</tr>
<xsl:apply-templates select="//CodeMetricsReport/Targets/Target/Modules/Module" />
</table>
</xsl:template>
<xsl:template match="Module">
<tr>
<td>
<xsl:value-of select="@Name"/>
</td>
<td>
<xsl:value-of select="Metrics/Metric[@Name='MaintainabilityIndex']/@Value"/>
</td>
<td>
<xsl:value-of select="Metrics/Metric[@Name='CyclomaticComplexity']/@Value"/>
</td>
<td>
<xsl:value-of select="Metrics/Metric[@Name='ClassCoupling']/@Value"/>
</td>
<td>
<xsl:value-of select="Metrics/Metric[@Name='DepthOfInheritance']/@Value"/>
</td>
<td>
<xsl:value-of select="Metrics/Metric[@Name='LinesOfCode']/@Value"/>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,161 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"
encoding="ISO-8859-1"
standalone="yes"
version="1.0"
indent="yes"/>
<xsl:param name="applicationPath"/>
<xsl:param name="onlyShowBuildsWithModifications"/>
<xsl:template match="/">
<script type="text/javascript">
function toggleTr(imgId, trId)
{
eTr = document.getElementById(trId);
eImg = document.getElementById(imgId);
if ( eTr.style.display == "none" )
{
/* Setting a TR to display:block doesn't work in proper browsers
but IE6's dodgy CSS implementation doesn't know table-row so
we need to try...catch it */
try
{
eTr.style.display="table-row";
}
catch(e)
{
eTr.style.display="block";
}
eImg.src="<xsl:value-of select="$applicationPath"/>/images/arrow_minus_small.gif";
}
else
{
eTr.style.display = "none";
eImg.src="<xsl:value-of select="$applicationPath"/>/images/arrow_plus_small.gif";
}
}
</script>
<H3>Modification History</H3>
<table width="98%">
<xsl:for-each select="//Build">
<xsl:sort select="@BuildDate" order="descending" data-type="text" />
<xsl:call-template name="ShowBuildRow" />
</xsl:for-each>
</table>
</xsl:template>
<xsl:template name="ShowBuildRow">
<xsl:if test="count(modifications/modification)>0 or ( (count(modifications/modification)=0 and $onlyShowBuildsWithModifications=false() )) ">
<xsl:variable name="Build_Id">
<xsl:value-of select="generate-id(@BuildDate)" />
</xsl:variable>
<tr> <!-- color the row according to success or failure -->
<xsl:call-template name="GetBuildRowColor">
<xsl:with-param name="Succeeded" select="@Success" />
</xsl:call-template>
<th align="left">
<!-- add a clickable section to expand or collapse the changes within this build -->
<span>
<xsl:attribute name="onclick">
<xsl:text>toggleTr('img-</xsl:text>
<xsl:value-of select="$Build_Id" />
<xsl:text>','</xsl:text>
<xsl:value-of select="$Build_Id" />
<xsl:text>')</xsl:text>
</xsl:attribute>
<xsl:attribute name="class">
<xsl:text>clickable</xsl:text>
</xsl:attribute>
<img src="{$applicationPath}/images/arrow_plus_small.gif"
alt="Toggle display of the changes within this build">
<xsl:attribute name="id">
<xsl:text>img-</xsl:text>
<xsl:value-of select="$Build_Id" />
</xsl:attribute>
</img>
<!-- show data of this build -->
<xsl:text>&#0160;&#0160;&#0160;&#0160;</xsl:text>
<xsl:value-of select="@BuildDate"/>
<xsl:text>&#0160;</xsl:text>
Label : <xsl:value-of select="@Label"/>
<xsl:text>&#0160;&#0160;&#0160;&#0160;Changed Files: </xsl:text>
<xsl:value-of select="count(modifications/modification)" />
<xsl:if test="string-length(modifications/modification/issueUrl)!=0">
<xsl:text>&#0160;&#0160;&#0160;&#0160;</xsl:text>
<A><xsl:attribute name="HREF"><xsl:value-of select="modifications/modification/issueUrl"/></xsl:attribute><xsl:value-of select="modifications/modification/comment"/></A>
</xsl:if>
<xsl:if test="string-length(modifications/modification/issueUrl)=0">
<xsl:text>&#0160;&#0160;&#0160;&#0160; </xsl:text>
<xsl:for-each select="modifications/modification[ not (comment=preceding-sibling::modification/comment) ] /comment" >
<xsl:value-of select="."/><xsl:text>&#0160;--&#0160; </xsl:text>
</xsl:for-each>
</xsl:if>
</span>
</th>
</tr>
<tr>
<xsl:attribute name="id">
<xsl:value-of select="$Build_Id" />
</xsl:attribute>
<xsl:attribute name="style">
<xsl:text>display:none;</xsl:text>
</xsl:attribute>
<td>
<table cellspacing="0" border="0" class="section-table" width="98%">
<xsl:for-each select="modifications/modification">
<tr>
<xsl:if test="position() mod 2=0">
<xsl:attribute name="class">section-oddrow</xsl:attribute>
</xsl:if>
<xsl:if test="position() mod 2!=0">
<xsl:attribute name="class">section-evenrow</xsl:attribute>
</xsl:if>
<td/>
<td class="section-data"><xsl:attribute name="NOWRAP"/><xsl:value-of select="@type"/></td>
<td class="section-data"><xsl:attribute name="NOWRAP"/><xsl:value-of select="user"/></td>
<td class="section-data"><xsl:value-of select="comment"/></td>
<td class="section-data"><xsl:value-of select="project"/>/<xsl:value-of select="filename"/></td>
</tr>
</xsl:for-each>
</table>
</td>
</tr>
</xsl:if>
</xsl:template>
<xsl:template name="GetBuildRowColor">
<xsl:param name="Succeeded" />
<xsl:attribute name="bgcolor">
<xsl:choose>
<xsl:when test="$Succeeded='True'">
<xsl:text>#339900</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>#FF0000</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
+185
View File
@@ -0,0 +1,185 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:param name="highCoverage"
select="65" />
<xsl:param name="mediumCoverage"
select="40" />
<xsl:template match="/">
<style>
.mhc
{ #method high coverage
text-align: left;
background-color:#86ed60;
}
.mmc
{ #method medium coverage
text-align: left;
background-color:#ffff99;
}
.mbc
{ #method bad coverage
text-align: left;
background-color:#eb4848;
}
.chc
{ #class high coverage
text-align: left;
border-right: 1px solid #649cc0;
border-bottom: 1px solid #649cc0;
width: 100;
font-weight: bold;
background-color:#86ed60;
margin-right:16px;
}
.cmc
{ #class high coverage
text-align: left;
border-right: 1px solid #649cc0;
border-bottom: 1px solid #649cc0;
width: 100;
font-weight: bold;
background-color:#ffff99;
margin-right:16px;
}
.cbc
{ #class high coverage
text-align: left;
border-right: 1px solid #649cc0;
border-bottom: 1px solid #649cc0;
width: 100;
font-weight: bold;
background-color:#eb4848;
margin-right:16px;
}
</style>
<xsl:variable name="root"
select="//CoverageDSPriv" />
<xsl:if test="$root">
<h3>Code Coverage Summary (MsTest)</h3>
<table class="section-table"
cellpadding="2"
cellspacing="0"
border="1">
<tr><td class="mhc">highCoverage &gt;= <xsl:value-of select="$highCoverage" /> %</td></tr>
<tr><td class="mmc">mediumCoverage &gt;= <xsl:value-of select="$mediumCoverage" /> %</td></tr>
<tr><td class="mbc">bad &lt; <xsl:value-of select="$mediumCoverage" /> % </td></tr>
</table>
<br/>
<table cellpadding="4"
cellspacing="0">
<tr>
<th style="border: 1px solid #649cc0; background-color: #a9d9f7; text-align: left;">Assembly</th>
<th style="border-top: 1px solid #649cc0; border-bottom: 1px solid #649cc0; border-right: 1px solid #649cc0; background-color: #a9d9f7;">Blocks Covered</th>
<th style="border-top: 1px solid #649cc0; border-bottom: 1px solid #649cc0; border-right: 1px solid #649cc0; background-color: #a9d9f7;">Blocks Not Covered</th>
<th style="border-top: 1px solid #649cc0; border-bottom: 1px solid #649cc0; border-right: 1px solid #649cc0; background-color: #a9d9f7;">Coverage</th>
</tr>
<xsl:for-each select="$root/Module">
<tr>
<td style="border-left: 1px solid #649cc0; border-right: 1px solid #649cc0; border-bottom: 1px solid #649cc0; padding-right: 10px">
<xsl:value-of select="ModuleName" />
</td>
<td style="text-align: right; border-right: 1px solid #649cc0; border-bottom: 1px solid #649cc0;">
<xsl:value-of select="BlocksCovered" />
</td>
<td style="text-align: right; border-right: 1px solid #649cc0; border-bottom: 1px solid #649cc0;">
<xsl:value-of select="BlocksNotCovered" />
</td>
<td>
<xsl:variable name="pctCovered"
select="(BlocksCovered div (BlocksCovered + BlocksNotCovered)) * 100" />
<xsl:attribute name="style">
text-align: right; border-right: 1px solid #649cc0; border-bottom: 1px solid #649cc0; width: 100; font-weight: bold;
<xsl:choose>
<xsl:when test="number($pctCovered &gt;= $highCoverage)">background-color:#86ed60;</xsl:when>
<xsl:when test="number($pctCovered &gt;= $mediumCoverage)">background-color:#ffff99;</xsl:when>
<xsl:otherwise>background-color:#eb4848;</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:if test="$pctCovered > 0">
<xsl:value-of select="format-number($pctCovered, '###.##')" />%
</xsl:if>
<xsl:if test="$pctCovered = 0">
0.00%
</xsl:if>
</td>
</tr>
</xsl:for-each>
</table>
<xsl:apply-templates select="//CoverageDSPriv/Module" />
</xsl:if>
</xsl:template>
<xsl:template match="Module">
<h3>
<xsl:value-of select="ModuleName"/>
</h3>
<ul>
<xsl:apply-templates select="./NamespaceTable" />
</ul>
</xsl:template>
<xsl:template match="NamespaceTable">
<xsl:apply-templates select="./Class" />
</xsl:template>
<xsl:template match="Class">
<li>
<xsl:variable name="pctCovered"
select="(BlocksCovered div (BlocksCovered + BlocksNotCovered)) * 100" />
<span><xsl:attribute name="class"><xsl:choose>
<xsl:when test="number($pctCovered &gt;= $highCoverage)">chc</xsl:when>
<xsl:when test="number($pctCovered &gt;= $mediumCoverage)">cmc</xsl:when>
<xsl:otherwise>cbc</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="ClassName"/>
</span>
<xsl:if test="$pctCovered > 0"><xsl:value-of select="format-number($pctCovered, '###.##')" />%</xsl:if>
<xsl:if test="$pctCovered = 0">0.00%</xsl:if>
<table>
<xsl:apply-templates select="./Method" />
</table>
</li>
</xsl:template>
<xsl:template match="Method">
<xsl:variable name="pctCovered"
select="(BlocksCovered div (BlocksCovered + BlocksNotCovered)) * 100" />
<tr><td width="50">
<xsl:if test="$pctCovered > 0"><xsl:value-of select="format-number($pctCovered, '###.##')" />%</xsl:if>
<xsl:if test="$pctCovered = 0">0.00%</xsl:if></td><td>
<xsl:attribute name="class"><xsl:choose>
<xsl:when test="number($pctCovered &gt;= $highCoverage)">mhc</xsl:when>
<xsl:when test="number($pctCovered &gt;= $mediumCoverage)">mmc</xsl:when>
<xsl:otherwise>mbc</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="MethodName"/></td></tr>
</xsl:template>
</xsl:stylesheet>
+140
View File
@@ -0,0 +1,140 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
XSLT Schema for generating build reports for CCNet Dashboard from unit test report generated by MSTest utility (v. 8.0.50727.26)
Author: Roman V. Gavrilov (clavrg@hotmail.com)
-->
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<!--
TestOutcome:
1 - Failed
4 - Inconclusive
10 - Passed
-->
<xsl:variable name="pass_toplevel" select="count(/cruisecontrol/build/Tests/UnitTestResult[outcome=10])"/>
<xsl:variable name="pass_multiples" select="count(/cruisecontrol/build/Tests/UnitTestResult/innerResults/element[outcome=10])"/>
<xsl:variable name="pass_count" select="$pass_toplevel + $pass_multiples"/>
<xsl:variable name="inconclusive_toplevel" select="count(/cruisecontrol/build/Tests/UnitTestResult[outcome=4])"/>
<xsl:variable name="inconclusive_multiples" select="count(/cruisecontrol/build/Tests/UnitTestResult/innerResults/element[outcome=4])"/>
<xsl:variable name="inconclusive_count" select="$inconclusive_toplevel + $inconclusive_multiples"/>
<xsl:variable name="failed_toplevel" select="count(/cruisecontrol/build/Tests/UnitTestResult[outcome=1])"/>
<xsl:variable name="failed_multiples" select="count(/cruisecontrol/build/Tests/UnitTestResult/innerResults/element[outcome=1])"/>
<xsl:variable name="failed_count" select="$failed_toplevel + $failed_multiples"/>
<xsl:variable name="total_count" select="$failed_count + $pass_count + $inconclusive_count"/>
<table class="section-table" width="100%">
<tr>
<td class="sectionheader">
Tests run: <xsl:value-of select="$total_count"/>, Failures: <xsl:value-of select="$failed_count"/>, Inconclusive: <xsl:value-of select="$inconclusive_count"/>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td width="100">
<b>Passed:</b>
</td>
<td>
<xsl:value-of select="$pass_count"/>
</td>
</tr>
<tr>
<td>
<b>Failed:</b>
</td>
<td>
<xsl:value-of select="$failed_count"/>
</td>
</tr>
<tr>
<td>
<b>Inconclusive:</b>
</td>
<td>
<xsl:value-of select="$inconclusive_count"/>
</td>
</tr>
</table>
</td>
</tr>
<!-- BAR -->
<tr>
<td width="100%">
<table border="1" width="100%">
<tr height="20">
<xsl:choose>
<xsl:when test="$total_count=$pass_count">
<td bgcolor="00FF33" align="center">
<b>PASSED</b>
</td>
</xsl:when>
<xsl:otherwise>
<td bgcolor="FF0000" align="center">
<b>FAILED</b>
</td>
</xsl:otherwise>
</xsl:choose>
</tr>
</table>
</td>
</tr>
<!-- DETAILS TABLE -->
<tr>
<td>
<table border="1" width="100%" frame="box">
<tr bgcolor="#2288FF">
<th align="center" width="40">Code</th>
<th align="left">Method</th>
<th align="left">Class</th>
<th align="left">Message</th>
<th align="left">Duration</th>
</tr>
<xsl:for-each select="/cruisecontrol/build/Tests/TestRun/tests/value">
<xsl:variable name="testId" select="id/id"/>
<xsl:variable name="UnitTestResult" select="/cruisecontrol/build/Tests/UnitTestResult[id/testId/id=$testId]"/>
<tr>
<xsl:choose>
<xsl:when test="$UnitTestResult/outcome = 10">
<td bgcolor="00FF33" align="center"> P </td>
</xsl:when>
<xsl:when test="$UnitTestResult/outcome = 1">
<td bgcolor="FF0000" align="center"> F </td>
</xsl:when>
<xsl:when test="$UnitTestResult/outcome = 4">
<td bgcolor="FFCC00" align="center"> I </td>
</xsl:when>
<xsl:otherwise>
<td bgcolor="3399FF" align="center"> ? </td>
</xsl:otherwise>
</xsl:choose>
<td>
<xsl:value-of select="name"/>
</td>
<td>
<script type="text/javascript">
var str= &quot; <xsl:value-of select="testMethod/className"/> &quot;
var pos=str.indexOf(",");
if (pos>=0) { var cs = str.substring(0, pos); document.write(cs); }
else { document.write("&lt; class name not specified&gt;"); }
</script>
</td>
<td>
<xsl:value-of select="$UnitTestResult/errorInfo/message"/>
</td>
<td>
<xsl:value-of select="concat(substring-before($UnitTestResult/duration,'.'),'.',substring(substring-after($UnitTestResult/duration,'.'),1,7))"/>
</td>
</tr>
</xsl:for-each>
</table>
</td>
</tr>
</table>
</xsl:template>
</xsl:transform>
@@ -0,0 +1,257 @@
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:apply-templates select="/cruisecontrol/build/*[local-name()='TestRun']" />
</xsl:template>
<xsl:template match="/cruisecontrol/build/*[local-name()='TestRun']">
<h1>
Test Run: <xsl:value-of select="@name" />
</h1>
<h2>Summary</h2>
<p>
Designated outcome :
<xsl:choose>
<xsl:when test="*[local-name()='ResultSummary']/@outcome ='Passed'">
<span style="color: forestGreen; font-weight: bold;">
<xsl:value-of select="*[local-name()='ResultSummary']/@outcome" />
</span>
</xsl:when>
<xsl:otherwise>
<span style="color: Red; font-weight: bold;">
<xsl:value-of select="*[local-name()='ResultSummary']/@outcome" />
</span>
</xsl:otherwise>
</xsl:choose>
</p>
<table border="1" cellSpacing="0" cellPadding="5" >
<thead style="text-align: center;">
<td>Number of Tests</td>
<td style="background-color: forestGreen; color:white">Passed</td>
<td style="background-color: fireBrick; color: white;">Failed</td>
<td style="background-color: yellow; color:black;">Inconclusive</td>
<td style="background-color: red; color: black;">Aborted</td>
<td style="background-color: darkblue; color: white;">Timeout</td>
<td style="background-color: darkblue; color: white;">Started at</td>
<td style="background-color: darkblue; color: white;">Stopped at</td>
</thead>
<tr style="text-align: center;">
<td>
<xsl:value-of select="*[local-name()='ResultSummary']//*[local-name()='Counters']/@total" />
</td>
<td>
<xsl:value-of select="*[local-name()='ResultSummary']//*[local-name()='Counters']/@passed" />
</td>
<td>
<xsl:value-of select="*[local-name()='ResultSummary']//*[local-name()='Counters']/@failed" />
</td>
<td>
<xsl:value-of select="*[local-name()='ResultSummary']//*[local-name()='Counters']/@inconclusive" />
</td>
<td>
<xsl:value-of select="*[local-name()='ResultSummary']//*[local-name()='Counters']/@aborted" />
</td>
<td>
<xsl:value-of select="*[local-name()='ResultSummary']//*[local-name()='Counters']/@timeout" />
</td>
<td>
<xsl:call-template name="formatDateTime">
<xsl:with-param name="dateTime" select="*[local-name()='Times']/@creation" />
</xsl:call-template>
</td>
<td>
<xsl:call-template name="formatDateTime">
<xsl:with-param name="dateTime" select="*[local-name()='Times']/@finish" />
</xsl:call-template>
</td>
</tr>
</table>
<xsl:variable name="runinfos" select="*[local-name()='ResultSummary']/*[local-name()='RunInfos']/*[local-name()='RunInfo']" />
<xsl:if test="count($runinfos) > 0">
<h3>Errors and Warnings</h3>
<table width="100%" border="1" cellSpacing="0" style="font-size:small;">
<xsl:apply-templates select="$runinfos" />
</table>
</xsl:if>
<xsl:apply-templates select="*[local-name()='Results']">
</xsl:apply-templates>
</xsl:template>
<xsl:template match="*[local-name()='RunInfo']">
<tr>
<td>
<pre>
<xsl:apply-templates select="*" />
</pre>
</td>
</tr>
</xsl:template>
<xsl:template match="*[local-name()='Results']">
<h2>Test Results</h2>
<table border="1" cellPadding="2" cellSpacing="0" width="98%">
<thead style="text-align: center; font-size: large; font-weight:bold;background-color:#33CCFF">
<td>Test List Name</td>
<td>Test Name</td>
<td>Test Result</td>
<td>Test Duration</td>
</thead>
<tr>
<xsl:apply-templates select="./*" />
</tr>
</table>
</xsl:template>
<xsl:template match="*[local-name()='TestResultAggregation']">
<tr>
<td colspan="3">
<center>
<b>Composite Test : <xsl:value-of select="@testName "/></b><br />
<table border="1" style="text-align: center;" cellSpacing="0" cellpadding="5" >
<thead>
<td style="background-color: forestGreen; color:white">Passed</td>
<td style="background-color: fireBrick; color:white;">Failed</td>
<td style="background-color: yellow; color:black;">Inconclusive</td>
<td style="background-color: red; color: black;">Aborted</td>
<td style="background-color: darkblue; color:white;">Timeout</td>
</thead>
<tr>
<td>
<xsl:value-of select="*[local-name()='Counters']/@passed"/>
</td>
<td>
<xsl:value-of select="*[local-name()='Counters']/@failed"/>
</td>
<td>
<xsl:value-of select="*[local-name()='Counters']/@inconclusive"/>
</td>
<td>
<xsl:value-of select="*[local-name()='Counters']/@aborted"/>
</td>
<td>
<xsl:value-of select="*[local-name()='Counters']/@timeout"/>
</td>
</tr>
</table>
</center>
</td>
</tr>
<xsl:apply-templates select="./*[local-name()='InnerResults']/*" />
<tr>
<td colspan="4" style="text-align: center; font-weight: bold;">
End of composite test : <xsl:value-of select="@testName "/>
</td>
</tr>
</xsl:template>
<xsl:template match="*[local-name()='UnitTestResult']">
<xsl:variable name="tstid" select="@testListId" />
<xsl:variable name="tstListName" select="/cruisecontrol/build/*[local-name()='TestRun']/*[local-name()='TestLists']/*[local-name()='TestList'][@id=$tstid]/@name" />
<tr>
<td>
<xsl:value-of select="$tstListName"/>
</td>
<td>
<xsl:value-of select="@testName"/>
</td>
<xsl:choose>
<xsl:when test="@outcome = 'Passed'">
<td style="text-align: center; font-weight: bold; background-color: forestGreen; color: white;">
<xsl:value-of select="@outcome"/>
</td>
</xsl:when>
<xsl:when test="@outcome = 'Failed'">
<td style="text-align: center; font-weight: bold; background-color: fireBrick; color: white;">
<xsl:value-of select="@outcome"/>
</td>
</xsl:when>
<xsl:when test="@outcome = 'Inconclusive'">
<td style="text-align: center; font-weight: bold; background-color: yellow; color: black;">
<xsl:value-of select="@outcome"/>
</td>
</xsl:when>
<xsl:otherwise>
<td style="text-align: center; font-weight: bold; background-color: lightblue; color: black; ">
<xsl:value-of select="@outcome"/>
</td>
</xsl:otherwise>
</xsl:choose>
<td style="text-align: right;">
<xsl:value-of select="@duration"/>
</td>
</tr>
<xsl:apply-templates select="./*[local-name()='Output']/*[local-name()='ErrorInfo']" />
</xsl:template>
<xsl:template match="*[local-name()='ErrorInfo']">
<tr>
<td colspan="4" bgcolor="#FF9900">
<b><xsl:value-of select="./*[local-name()='Message']" /></b><br />
<xsl:value-of select="./*[local-name()='StackTrace']" />
</td>
</tr>
</xsl:template>
<xsl:template match="*[local-name()='TestResult']">
<xsl:variable name="tstid" select="@testListId" />
<xsl:variable name="tstListName" select="/cruisecontrol/build/*[local-name()='TestRun']/*[local-name()='TestLists']/*[local-name()='TestList'][@id=$tstid]/@name" />
<tr>
<td>
<xsl:value-of select="$tstListName"/>
</td>
<td>
<xsl:value-of select="@testName"/>
</td>
<xsl:choose>
<xsl:when test="@outcome = 'Passed'">
<td style="text-align: center; font-weight: bold; background-color: forestGreen; color: white">
<xsl:value-of select="@outcome"/>
</td>
</xsl:when>
<xsl:when test="@outcome = 'Failed'">
<td style="text-align: center; font-weight: bold; background-color: fireBrick; color: white ">
<xsl:value-of select="@outcome"/>
</td>
</xsl:when>
<xsl:when test="@outcome = 'Inconclusive'">
<td style="text-align: center; font-weight: bold; background-color: yellow; color: black;">
<xsl:value-of select="@outcome"/>
</td>
</xsl:when>
<xsl:otherwise>
<td style="text-align: center; font-weight: bold; background-color: lightblue; color: black; ">
<xsl:value-of select="@outcome"/>
</td>
</xsl:otherwise>
</xsl:choose>
<td style="text-align: right;">
<xsl:value-of select="@duration"/>
</td>
</tr>
</xsl:template>
<xsl:template name="formatDateTime">
<xsl:param name="dateTime" />
<xsl:variable name="date" select="substring-before($dateTime, 'T')" />
<xsl:variable name="year" select="substring-before($date, '-')" />
<xsl:variable name="month" select="substring-before(substring-after($date, '-'), '-')" />
<xsl:variable name="day" select="substring-after(substring-after($date, '-'), '-')" />
<xsl:variable name="alltime" select="substring-after($dateTime, 'T')" />
<xsl:variable name="time" select="substring-before($alltime, '.')" />
<xsl:value-of select="concat($day, '-', $month, '-', $year, ' ',$time)" />
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,417 @@
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<style>
td
{
text-align: left;
}
.tst_dur
{
text-align: right;
}
.tst_nok
{
text-align: center;
font-weight: bold;
background-color: fireBrick;
color: white;
}
.tst_ok
{
text-align: center;
font-weight: bold;
background-color: forestGreen;
color: white;
}
.tst_inc
{
text-align: center;
font-weight: bold;
background-color: yellow;
color: black;
}
.tst_unk
{
text-align: center;
font-weight: bold;
background-color: lightblue;
color: black;
}
</style>
<xsl:apply-templates select="/cruisecontrol/build/*[local-name()='TestRun']" />
</xsl:template>
<xsl:template match="/cruisecontrol/build/*[local-name()='TestRun']">
<h1>
Test Run: <xsl:value-of select="@name" />
</h1>
<h2>Summary</h2>
<p>
Designated outcome :
<xsl:choose>
<xsl:when test="*[local-name()='ResultSummary']/@outcome ='Passed'">
<span style="color: forestGreen; font-weight: bold;">
<xsl:value-of select="*[local-name()='ResultSummary']/@outcome" />
</span>
</xsl:when>
<xsl:otherwise>
<span style="color: Red; font-weight: bold;">
<xsl:value-of select="*[local-name()='ResultSummary']/@outcome" />
</span>
</xsl:otherwise>
</xsl:choose>
</p>
<table border="1"
cellSpacing="0"
cellPadding="5" >
<thead style="text-align: center;">
<td>Number of Tests</td>
<td style="background-color: forestGreen; color:white">Passed</td>
<td style="background-color: fireBrick; color: white;">Failed</td>
<td style="background-color: yellow; color:black;">Inconclusive</td>
<td style="background-color: red; color: black;">Aborted</td>
<td style="background-color: darkblue; color: white;">Timeout</td>
<td style="background-color: darkorange; color: white;">Unknown</td>
<td style="background-color: DarkSlateGray; color: white;">Started at</td>
<td style="background-color: DimGrey; color: white;">Stopped at</td>
</thead>
<tr style="text-align: center;">
<td>
<xsl:value-of select="*[local-name()='ResultSummary']//*[local-name()='Counters']/@total" />
</td>
<td>
<xsl:value-of select="*[local-name()='ResultSummary']//*[local-name()='Counters']/@passed" />
</td>
<td>
<xsl:value-of select="*[local-name()='ResultSummary']//*[local-name()='Counters']/@failed" />
</td>
<td>
<xsl:value-of select="*[local-name()='ResultSummary']//*[local-name()='Counters']/@inconclusive" />
</td>
<td>
<xsl:value-of select="*[local-name()='ResultSummary']//*[local-name()='Counters']/@aborted" />
</td>
<td>
<xsl:value-of select="*[local-name()='ResultSummary']//*[local-name()='Counters']/@timeout" />
</td>
<td>
<xsl:value-of select="count(*[local-name()='Results']/*[local-name()='UnitTestResult'][not(@outcome)] )" />
</td>
<td>
<xsl:call-template name="formatDateTime">
<xsl:with-param name="dateTime"
select="*[local-name()='Times']/@creation" />
</xsl:call-template>
</td>
<td>
<xsl:call-template name="formatDateTime">
<xsl:with-param name="dateTime"
select="*[local-name()='Times']/@finish" />
</xsl:call-template>
</td>
</tr>
</table>
<xsl:variable name="runinfos"
select="*[local-name()='ResultSummary']/*[local-name()='RunInfos']/*[local-name()='RunInfo']" />
<xsl:if test="count($runinfos) > 0">
<h3>Errors and Warnings</h3>
<table width="100%"
border="1"
cellSpacing="0"
style="font-size:small;">
<xsl:apply-templates select="$runinfos" />
</table>
</xsl:if>
<!-- bad ones *[local-name()='ResultSummary']/@outcome ='Passed' -->
<xsl:variable name="count_badones"
select="count(*[local-name()='Results']/*[local-name()='UnitTestResult'][@outcome != 'Passed'])" />
<xsl:variable name="count_badones2"
select="count(*[local-name()='Results']/*[local-name()='UnitTestResult'][not(@outcome)] ) " />
<xsl:if test="$count_badones + $count_badones2 > 0">
<h2>Failed tests </h2>
<table border="1"
cellPadding="2"
cellSpacing="0"
>
<thead style="text-align: center; font-size: large; font-weight:bold;background-color:#FF4000">
<td>Test List Name</td>
<td>Test Name</td>
<td>Test Result</td>
<td>Test Duration</td>
<td>Class Name</td>
<td>Category</td>
</thead>
<tr>
<xsl:apply-templates select="*[local-name()='Results']/*[local-name()='UnitTestResult'][@outcome='Failed']" >
</xsl:apply-templates>
</tr>
<tr>
<xsl:apply-templates select="*[local-name()='Results']/*[local-name()='UnitTestResult'][not(@outcome)]" >
</xsl:apply-templates>
</tr>
</table>
</xsl:if>
<h3>Longest running tests</h3>
<!--
<xsl:apply-templates select="*[local-name()='Results']/*[local-name()='UnitTestResult'] " >
</xsl:apply-templates>
-->
<ol>
<xsl:for-each select="*[local-name()='Results']/*[local-name()='UnitTestResult']">
<xsl:sort select="@duration" order="descending"/>
<xsl:if test="position() &lt; 21">
<li><xsl:value-of select= "@duration"/> - <xsl:value-of select= "@testName"/></li>
</xsl:if>
</xsl:for-each>
</ol>
<!-- full test overview -->
<xsl:apply-templates select="*[local-name()='Results']">
</xsl:apply-templates>
</xsl:template>
<xsl:template match="*[local-name()='RunInfo']">
<tr>
<td>
<xsl:apply-templates select="*" />
</td>
</tr>
</xsl:template>
<xsl:template match="*[local-name()='Results']">
<h2>Test Results</h2>
<table border="1"
cellPadding="2"
cellSpacing="0"
width="98%">
<thead style="text-align: center; font-size: large; font-weight:bold;background-color:#33CCFF">
<td>Test List Name</td>
<td>Test Name</td>
<td>Test Result</td>
<td>Test Duration</td>
<!--
<td>Test Start</td>
<td>Test End</td>
-->
<td>Class Name</td>
<td>Test Categories</td>
</thead>
<tr>
<xsl:apply-templates select="./*" />
</tr>
</table>
</xsl:template>
<xsl:template match="*[local-name()='TestResultAggregation']">
<tr>
<td colspan="3">
<center>
<b>
Composite Test : <xsl:value-of select="@testName "/>
</b>
<br />
<table border="1"
style="text-align: center;"
cellSpacing="0"
cellpadding="5" >
<thead>
<td style="background-color: forestGreen; color:white">Passed</td>
<td style="background-color: fireBrick; color:white;">Failed</td>
<td style="background-color: yellow; color:black;">Inconclusive</td>
<td style="background-color: red; color: black;">Aborted</td>
<td style="background-color: darkblue; color:white;">Timeout</td>
</thead>
<tr>
<td>
<xsl:value-of select="*[local-name()='Counters']/@passed"/>
</td>
<td>
<xsl:value-of select="*[local-name()='Counters']/@failed"/>
</td>
<td>
<xsl:value-of select="*[local-name()='Counters']/@inconclusive"/>
</td>
<td>
<xsl:value-of select="*[local-name()='Counters']/@aborted"/>
</td>
<td>
<xsl:value-of select="*[local-name()='Counters']/@timeout"/>
</td>
</tr>
</table>
</center>
</td>
</tr>
<xsl:apply-templates select="./*[local-name()='InnerResults']/*" />
<tr>
<td colspan="4"
style="text-align: center; font-weight: bold;">
End of composite test : <xsl:value-of select="@testName "/>
</td>
</tr>
</xsl:template>
<xsl:template match="*[local-name()='UnitTestResult']">
<xsl:variable name="tstid"
select="@testListId" />
<xsl:variable name="tstListName"
select="/cruisecontrol/build/*[local-name()='TestRun']/*[local-name()='TestLists']/*[local-name()='TestList'][@id=$tstid]/@name" />
<xsl:variable name="testid"
select="@testId" />
<xsl:variable name="tstClassname"
select="/cruisecontrol/build/*[local-name()='TestRun']/*[local-name()='TestDefinitions']/*[local-name()='UnitTest'][@id=$testid]/*[local-name()='TestMethod']/@className" />
<xsl:variable name="cn"
select="substring-before($tstClassname,',')" />
<xsl:variable name="tstCategories">
<xsl:for-each select="/cruisecontrol/build/*[local-name()='TestRun']/*[local-name()='TestDefinitions']/*[local-name()='UnitTest'][@id=$testid]/*[local-name()='TestCategory']/*[local-name()='TestCategoryItem']">
<xsl:value-of select="@TestCategory" />
<xsl:if test="position()!=last()">, </xsl:if>
</xsl:for-each>
</xsl:variable>
<tr>
<td>
<xsl:value-of select="$tstListName"/>
</td>
<td>
<xsl:value-of select="@testName"/>
</td>
<xsl:choose>
<xsl:when test="@outcome = 'Passed'">
<td class="tst_ok">Passed</td>
</xsl:when>
<xsl:when test="@outcome = 'Failed'">
<td class="tst_nok">Failed</td>
</xsl:when>
<xsl:when test="@outcome = 'Inconclusive'">
<td class="tst_inc">Inconclusive</td>
</xsl:when>
<xsl:otherwise>
<td class="tst_unk ">
<xsl:value-of select="@outcome"/>
</td>
</xsl:otherwise>
</xsl:choose>
<td class="tst_dur">
<xsl:value-of select="@duration"/>
</td>
<!--
<td style="text-align: right;">
<xsl:value-of select="@startTime"/>
</td>
<td style="text-align: right;">
<xsl:value-of select="@endTime"/>
</td>
-->
<td >
<xsl:value-of select="$cn"/>
</td>
<td >
<xsl:value-of select="$tstCategories"/>
</td>
</tr>
<xsl:apply-templates select="./*[local-name()='Output']/*[local-name()='ErrorInfo']" />
</xsl:template>
<xsl:template match="*[local-name()='ErrorInfo']">
<tr>
<td colspan="6"
bgcolor="#FF9900">
<b>
<xsl:value-of select="./*[local-name()='Message']" />
</b>
<br />
<xsl:value-of select="./*[local-name()='StackTrace']" />
</td>
</tr>
</xsl:template>
<!--
<xsl:template match="*[local-name()='TestResult']">
<xsl:variable name="tstid"
select="@testListId" />
<xsl:variable name="tstListName"
select="/cruisecontrol/build/*[local-name()='TestRun']/*[local-name()='TestLists']/*[local-name()='TestList'][@id=$tstid]/@name" />
<tr>
<td>
<xsl:value-of select="$tstListName"/>
</td>
<td>
<xsl:value-of select="@testName"/>
</td>
<xsl:choose>
<xsl:when test="@outcome = 'Passed'">
<td style="text-align: center; font-weight: bold; background-color: forestGreen; color: white">
<xsl:value-of select="@outcome"/>
</td>
</xsl:when>
<xsl:when test="@outcome = 'Failed'">
<td style="text-align: center; font-weight: bold; background-color: fireBrick; color: white ">
<xsl:value-of select="@outcome"/>
</td>
</xsl:when>
<xsl:when test="@outcome = 'Inconclusive'">
<td style="text-align: center; font-weight: bold; background-color: yellow; color: black;">
<xsl:value-of select="@outcome"/>
</td>
</xsl:when>
<xsl:otherwise>
<td style="text-align: center; font-weight: bold; background-color: lightblue; color: black; ">
<xsl:value-of select="@outcome"/>
</td>
</xsl:otherwise>
</xsl:choose>
<td style="text-align: right;">
<xsl:value-of select="@duration"/>
</td>
</tr>
</xsl:template>
-->
<xsl:template name="formatDateTime">
<xsl:param name="dateTime" />
<xsl:variable name="date"
select="substring-before($dateTime, 'T')" />
<xsl:variable name="year"
select="substring-before($date, '-')" />
<xsl:variable name="month"
select="substring-before(substring-after($date, '-'), '-')" />
<xsl:variable name="day"
select="substring-after(substring-after($date, '-'), '-')" />
<xsl:variable name="alltime"
select="substring-after($dateTime, 'T')" />
<xsl:variable name="time"
select="substring-before($alltime, '.')" />
<xsl:value-of select="concat($day, '-', $month, '-', $year, ' ',$time)" />
</xsl:template>
</xsl:stylesheet>
+70
View File
@@ -0,0 +1,70 @@
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:variable name="pass_toplevel" select="count(/cruisecontrol/build/Tests/UnitTestResult[outcome=10])"/>
<xsl:variable name="pass_multiples" select="count(/cruisecontrol/build/Tests/UnitTestResult/innerResults/element[outcome=10])"/>
<xsl:variable name="pass_count" select="$pass_toplevel + $pass_multiples"/>
<xsl:variable name="inconclusive_toplevel" select="count(/cruisecontrol/build/Tests/UnitTestResult[outcome=4])"/>
<xsl:variable name="inconclusive_multiples" select="count(/cruisecontrol/build/Tests/UnitTestResult/innerResults/element[outcome=4])"/>
<xsl:variable name="inconclusive_count" select="$inconclusive_toplevel + $inconclusive_multiples"/>
<xsl:variable name="failed_toplevel" select="count(/cruisecontrol/build/Tests/UnitTestResult[outcome=1])"/>
<xsl:variable name="failed_multiples" select="count(/cruisecontrol/build/Tests/UnitTestResult/innerResults/element[outcome=1])"/>
<xsl:variable name="failed_count" select="$failed_toplevel + $failed_multiples"/>
<xsl:variable name="total_count" select="$failed_count + $pass_count + $inconclusive_count"/>
<xsl:if test="$total_count != 0">
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<tr>
<td class="sectionheader" colspan="3">
Tests run: <xsl:value-of select="$total_count"/>
Failures: <xsl:value-of select="$failed_count" />
Inconclusive: <xsl:value-of select="$inconclusive_count" />
</td>
</tr>
<xsl:choose>
<xsl:when test="$total_count = $pass_count">
<tr>
<td class="section-data" colspan="2">All tests passed.</td>
</tr>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="//Tests/UnitTestResult[outcome!=10]" />
</xsl:otherwise>
</xsl:choose>
</table>
</xsl:if>
</xsl:template>
<xsl:template match="UnitTestResult">
<xsl:variable name="testId" select="/cruisecontrol/build/Tests/UnitTestResult/id/testId/id"/>
<xsl:variable name="testDetails" select="/cruisecontrol/build/Tests/TestRun/tests/value[id=$testId]"/>
<tr>
<xsl:choose>
<xsl:when test="outcome = 1">
<td bgcolor="FF0000" align="center"> F </td>
</xsl:when>
<xsl:when test="outcome = 4">
<td bgcolor="FFCC00" align="center"> I </td>
</xsl:when>
<xsl:otherwise>
<td bgcolor="3399FF" align="center"> ? </td>
</xsl:otherwise>
</xsl:choose>
<td>
<script type="text/javascript">
var str= &quot; <xsl:value-of select="$testDetails/testMethod/className"/> &quot;
var pos=str.indexOf(",");
if (pos>=0) { var cs = str.substring(0, pos); document.write(cs); }
else { document.write("&lt; class name not specified&gt;"); }
</script>.<xsl:value-of select="$testDetails/testMethod/name"/>
</td>
<td>
<xsl:value-of select="errorInfo/message"/>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,59 @@
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:variable name="pass_count" select="sum(/cruisecontrol/build/*[local-name()='TestRun']/*[local-name()='ResultSummary']/*[local-name()='Counters']/@passed)"/>
<xsl:variable name="inconclusive_count" select="sum(/cruisecontrol/build/*[local-name()='TestRun']/*[local-name()='ResultSummary']/*[local-name()='Counters']/@inconclusive)"/>
<xsl:variable name="failed_count" select="sum(/cruisecontrol/build/*[local-name()='TestRun']/*[local-name()='ResultSummary']/*[local-name()='Counters']/@failed)"/>
<xsl:variable name="total_count" select="sum(/cruisecontrol/build/*[local-name()='TestRun']/*[local-name()='ResultSummary']/*[local-name()='Counters']/@total)"/>
<xsl:if test="$total_count > 0">
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<tr>
<td class="sectionheader" colspan="6">
Tests run: <xsl:value-of select="$total_count"/>
Failures: <xsl:value-of select="$failed_count" />
Inconclusive: <xsl:value-of select="$inconclusive_count" />
</td>
</tr>
<xsl:choose>
<xsl:when test="$total_count = $pass_count">
<tr>
<td class="section-data" colspan="2">All tests passed.</td>
<td class="section-data" colspan="2">Total count: <xsl:value-of select="$total_count"/></td>
<td class="section-data" colspan="2">Passed count: <xsl:value-of select="$pass_count"/></td>
</tr>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="/cruisecontrol/build/*[local-name()='TestRun']/*[local-name()='Results']/*[local-name()='UnitTestResult'][@outcome!='Passed']" />
</xsl:otherwise>
</xsl:choose>
</table>
</xsl:if>
</xsl:template>
<xsl:template match="*[local-name()='UnitTestResult']">
<tr>
<xsl:choose>
<xsl:when test="@outcome = 'Failed'">
<td bgcolor="FF0000" align="center"> F </td>
</xsl:when>
<xsl:when test="@outcome = 'Inconclusive'">
<td bgcolor="FFCC00" align="center"> I </td>
</xsl:when>
<xsl:otherwise>
<td bgcolor="3399FF" align="center"> ? </td>
</xsl:otherwise>
</xsl:choose>
<td>
<xsl:value-of select="@testName"/>
</td>
<td>
<xsl:value-of select="./*[local-name()='Output']/*[local-name()='ErrorInfo']/*[local-name()='Message']"/>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,59 @@
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:variable name="pass_count" select="sum(/cruisecontrol/build/*[local-name()='TestRun']/*[local-name()='ResultSummary']/*[local-name()='Counters']/@passed)"/>
<xsl:variable name="inconclusive_count" select="sum(/cruisecontrol/build/*[local-name()='TestRun']/*[local-name()='ResultSummary']/*[local-name()='Counters']/@inconclusive)"/>
<xsl:variable name="failed_count" select="sum(/cruisecontrol/build/*[local-name()='TestRun']/*[local-name()='ResultSummary']/*[local-name()='Counters']/@failed)"/>
<xsl:variable name="total_count" select="sum(/cruisecontrol/build/*[local-name()='TestRun']/*[local-name()='ResultSummary']/*[local-name()='Counters']/@total)"/>
<xsl:if test="$total_count > 0">
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<tr>
<td class="sectionheader" colspan="6">
Tests run: <xsl:value-of select="$total_count"/>
Failures: <xsl:value-of select="$failed_count" />
Inconclusive: <xsl:value-of select="$inconclusive_count" />
</td>
</tr>
<xsl:choose>
<xsl:when test="$total_count = $pass_count">
<tr>
<td class="section-data" colspan="2">All tests passed.</td>
<td class="section-data" colspan="2">Total count: <xsl:value-of select="$total_count"/></td>
<td class="section-data" colspan="2">Passed count: <xsl:value-of select="$pass_count"/></td>
</tr>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="/cruisecontrol/build/*[local-name()='TestRun']/*[local-name()='Results']/*[local-name()='UnitTestResult'][@outcome!='Passed']" />
</xsl:otherwise>
</xsl:choose>
</table>
</xsl:if>
</xsl:template>
<xsl:template match="*[local-name()='UnitTestResult']">
<tr>
<xsl:choose>
<xsl:when test="@outcome = 'Failed'">
<td bgcolor="FF0000" align="center"> F </td>
</xsl:when>
<xsl:when test="@outcome = 'Inconclusive'">
<td bgcolor="FFCC00" align="center"> I </td>
</xsl:when>
<xsl:otherwise>
<td bgcolor="3399FF" align="center"> ? </td>
</xsl:otherwise>
</xsl:choose>
<td>
<xsl:value-of select="@testName"/>
</td>
<td>
<xsl:value-of select="./*[local-name()='Output']/*[local-name()='ErrorInfo']/*[local-name()='Message']"/>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
+93
View File
@@ -0,0 +1,93 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:variable name="buildresults" select="/cruisecontrol/build/buildresults" />
<xsl:choose>
<xsl:when test="count($buildresults) > 0">
<xsl:choose>
<xsl:when test="$buildresults/failure">
<h2>Build Failed (<a href="#failure">click to see error</a>)</h2>
</xsl:when>
<xsl:otherwise>
<h2>Build Succeeded</h2>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="$buildresults" />
</xsl:when>
<xsl:otherwise>
<h2>Log does not contain any Xml output from NAnt.</h2>
<p>Please make sure that NAnt is executed using the XmlLogger (use the argument: <b>-logger:NAnt.Core.XmlLogger</b>). </p>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="buildresults">
<hr/>
<xsl:apply-templates />
</xsl:template>
<xsl:template match="target">
<p>
<xsl:value-of select="@name"/>:
</p>
<xsl:apply-templates />
</xsl:template>
<xsl:template match="task">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="message">
<span>
<xsl:if test="@level='Error'">
<xsl:attribute name="class">error</xsl:attribute>
</xsl:if>
<xsl:if test="@level='Warning'">
<xsl:attribute name="class">warning</xsl:attribute>
</xsl:if>
<xsl:if test="../@name != ''">
[<xsl:value-of select="../@name"/>]
</xsl:if>
<xsl:value-of select="text()" />
</span>
<br />
</xsl:template>
<xsl:template match="failure">
<a name="failure">
<xsl:apply-templates />
</a>
</xsl:template>
<xsl:template match="builderror">
<br/>
<span class="error">Build Error: <xsl:value-of select="type"/><br/>
<xsl:value-of select="message"/><br/>
<xsl:apply-templates select="location" />
<pre>
<xsl:value-of select="stacktrace" />
</pre>
</span>
</xsl:template>
<xsl:template match="internalerror">
<br/>
<span class="error">Internal Error: <xsl:value-of select="type"/><br/>
<xsl:value-of select="message"/><br/>
<xsl:apply-templates select="location" />
<pre>
<xsl:value-of select="stacktrace" />
</pre>
</span>
</xsl:template>
<xsl:template match="location">
in <xsl:value-of select="filename"/>
line: <xsl:value-of select="linenumber"/>
col: <xsl:value-of select="columnnumber"/><br/>
</xsl:template>
<xsl:template match="duration" />
</xsl:stylesheet>
+118
View File
@@ -0,0 +1,118 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:param name="applicationPath"/>
<xsl:template match="/">
<script type="text/javascript">
function toggleDiv(imgId, divId)
{
eDiv = document.getElementById(divId);
eImg = document.getElementById(imgId);
if ( eDiv.style.display == "none" )
{
eDiv.style.display="block";
eImg.src="<xsl:value-of select="$applicationPath"/>/images/arrow_minus_small.gif";
}
else
{
eDiv.style.display = "none";
eImg.src="<xsl:value-of select="$applicationPath"/>/images/arrow_plus_small.gif";
}
}
</script>
<div id="NAntTimingReport">
<h1>NAnt Build Timing Report</h1>
<xsl:variable name="buildresults" select="/cruisecontrol/build/buildresults" />
<xsl:choose>
<xsl:when test="count($buildresults) > 0">
<xsl:apply-templates select="$buildresults" />
</xsl:when>
<xsl:otherwise>
<h2>Log does not contain any Xml output from NAnt.</h2>
<p>Please make sure that NAnt is executed using the XmlLogger (use the argument: <b>-logger:NAnt.Core.XmlLogger</b>). </p>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:template>
<xsl:template match="buildresults">
<div id="Summary">
<h3>Summary</h3>
<table>
<tbody>
<tr>
<td>Total Build Time:</td>
<td><xsl:value-of select="../@buildtime"/></td>
</tr>
</tbody>
</table>
</div>
<div id="Details">
<h3>Details</h3>
<table width="70%">
<thead>
<tr>
<th align="left">Target</th>
<th align="right">Duration</th>
</tr>
</thead>
<tbody>
<xsl:apply-templates select="//target">
<xsl:sort select="duration" order="descending" data-type="number" />
</xsl:apply-templates>
</tbody>
</table>
</div>
</xsl:template>
<xsl:template match="target">
<tr>
<td valign="top">
<xsl:variable name="divId">
<xsl:value-of select="generate-id()" />
</xsl:variable>
<img src="{$applicationPath}/images/arrow_plus_small.gif" alt="Toggle to see tasks in this target">
<xsl:attribute name="id">
<xsl:text>img-</xsl:text>
<xsl:value-of select="$divId" />
</xsl:attribute>
<xsl:attribute name="onclick">toggleDiv('img-<xsl:value-of select="$divId" />','<xsl:value-of select="$divId" />')</xsl:attribute>
</img>&#0160;
<xsl:for-each select="ancestor::target"><xsl:value-of select="@name" />/</xsl:for-each>
<xsl:value-of select="@name" />
<div>
<xsl:attribute name="id">
<xsl:value-of select="$divId" />
</xsl:attribute>
<xsl:attribute name="style">
<xsl:text>display:none;</xsl:text>
</xsl:attribute>
<ul>
<xsl:apply-templates select="task">
<xsl:sort select="duration" order="descending" data-type="number" />
</xsl:apply-templates>
</ul>
</div>
</td>
<td valign="top" align="right">
<xsl:apply-templates select="duration" />
</td>
</tr>
</xsl:template>
<xsl:template match="task">
<li><xsl:value-of select="@name" /> - <xsl:apply-templates select="duration" /></li>
</xsl:template>
<xsl:template match="duration">
<xsl:variable name="hours" select="floor(node() div 3600000)" />
<xsl:variable name="minutes" select="floor((node() mod 3600000) div 60000)" />
<xsl:variable name="seconds" select="(node() mod 60000) div 1000" />
<xsl:if test="$hours > 0"><xsl:value-of select="$hours" />:</xsl:if>
<xsl:value-of select="format-number($minutes,'00')" />:<xsl:value-of select="format-number($seconds,'00.00')"/>
</xsl:template>
</xsl:stylesheet>
+71
View File
@@ -0,0 +1,71 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/xhtml1/strict">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:apply-templates select="//coverage[count(module) != 0]" />
</xsl:template>
<xsl:template match="coverage">
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<tr>
<td class="sectionheader" colspan="2">
<!-- Test Coverage Summary -->
NCover - Test Coverage:
<xsl:value-of select=
"round((count(//coverage/module/method/seqpnt[@visitcount > 0]) div count(//coverage/module/method/seqpnt)) * 100)"/>%
</td>
</tr>
<tr>
<td>
<div style="color: maroon; font-size: 10pt; font-weight: bold;">
Untested Code:
</div>
</td>
</tr>
<tr>
<td>
<xsl:apply-templates select="module"/>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="module">
<br />
<xsl:apply-templates select="method[./seqpnt[@visitcount = 0]]"/>
</xsl:template>
<xsl:template match="method">
<div style="color: maroon; font-size: 10pt; font-weight: bold;">
<xsl:value-of select="@class"/>.<xsl:value-of select="@name"/>
</div>
<table border="1" cellpadding="3" cellspacing="0" bordercolor="black" width="100%">
<xsl:apply-templates select="seqpnt[@visitcount = 0]"/>
</table>
<p/>
</xsl:template>
<xsl:template match="seqpnt">
<tr>
<xsl:if test="@line != 16707566">
<td bgcolor="#FFCCCC" width="15%">
Line: <xsl:value-of select="@line"/>
</td>
<td bgcolor="#FFFFEE">
<xsl:choose>
<!-- if this build is off the default CCNet working directory, shorten the path to show only the bits in version control. -->
<xsl:when test="contains(@document, '\WorkingDirectory\')">
<xsl:value-of select="substring-after(@document, '\WorkingDirectory\')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@document"/>
</xsl:otherwise>
</xsl:choose>
</td>
</xsl:if>
</tr>
</xsl:template>
</xsl:stylesheet>
+491
View File
@@ -0,0 +1,491 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<!-- Created for NCoverExplorer by Grant Drake (see http://www.kiwidude.com/blog/) -->
<!-- Note that all the extra logic inside this stylesheet checking for presence of -->
<!-- the @acceptable element on modules is for backwards compatibility with the -->
<!-- 1.3.3 NCoverExplorer version which did not write the element. Keeping these -->
<!-- checks ensures that older CC.Net build log renderings will still work fine. -->
<xsl:output method="html" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
<xsl:template match="/">
<xsl:comment>Generated by NCoverExplorer (see http://www.kiwidude.com/blog/)</xsl:comment>
<style>
body { font: small verdana, arial, helvetica; color:#000000; }
.coverageReportTable { font-size: 9px; }
.reportHeader { padding: 5px 8px 5px 8px; font-size: 12px; border: 1px solid; margin: 0px; }
.titleText { font-weight: bold; font-size: 12px; white-space: nowrap; padding: 0px; margin: 1px; }
.subtitleText { font-size: 9px; font-weight: normal; padding: 0px; margin: 1px; white-space: nowrap; }
.projectStatistics { font-size: 10px; border-left: #649cc0 1px solid; white-space: nowrap; width: 40%; }
.heading { font-weight: bold; }
.mainTableHeaderLeft { border: #dcdcdc 1px solid; font-weight: bold; padding-left: 5px; }
.mainTableHeader { border-bottom: 1px solid; border-top: 1px solid; border-right: 1px solid; text-align: center; }
.mainTableGraphHeader { border-bottom: 1px solid; border-top: 1px solid; border-right: 1px solid; text-align: left; font-weight: bold; }
.mainTableCellItem { background: #ffffff; border-left: #dcdcdc 1px solid; border-right: #dcdcdc 1px solid; padding-left: 10px; padding-right: 10px; font-weight: bold; font-size: 10px; }
.mainTableCellData { background: #ffffff; border-right: #dcdcdc 1px solid; text-align: center; white-space: nowrap; }
.mainTableCellPercent { background: #ffffff; font-weight: bold; white-space: nowrap; text-align: right; padding-left: 10px; }
.mainTableCellGraph { background: #ffffff; border-right: #dcdcdc 1px solid; padding-right: 5px; }
.mainTableCellBottom { border-bottom: #dcdcdc 1px solid; }
.childTableHeader { border-top: 1px solid; border-bottom: 1px solid; border-left: 1px solid; border-right: 1px solid; font-weight: bold; padding-left: 10px; }
.childTableCellIndentedItem { background: #ffffff; border-left: #dcdcdc 1px solid; border-right: #dcdcdc 1px solid; padding-right: 10px; font-size: 10px; }
.exclusionTableCellItem { background: #ffffff; border-left: #dcdcdc 1px solid; border-right: #dcdcdc 1px solid; padding-left: 10px; padding-right: 10px; }
.projectTable { background: #a9d9f7; border-color: #649cc0; }
.primaryTable { background: #d7eefd; border-color: #a4dafc; }
.secondaryTable { background: #f9e9b7; border-color: #f6d376; }
.secondaryChildTable { background: #fff6df; border-color: #f5e1b1; }
.exclusionTable { background: #fadada; border-color: #f37f7f; }
.graphBarNotVisited { font-size: 2px; border:#9c9c9c 1px solid; background:#df0000; }
.graphBarSatisfactory { font-size: 2px; border:#9c9c9c 1px solid; background:#f4f24e; }
.graphBarVisited { background: #00df00; font-size: 2px; border-left:#9c9c9c 1px solid; border-top:#9c9c9c 1px solid; border-bottom:#9c9c9c 1px solid; }
.graphBarVisitedFully { background: #00df00; font-size: 2px; border:#9c9c9c 1px solid; }
</style>
<table class="coverageReportTable" cellpadding="2" cellspacing="0">
<tbody>
<xsl:apply-templates select="//coverageReport" />
</tbody>
</table>
</xsl:template>
<!-- Main Project Section -->
<xsl:template match="//coverageReport">
<xsl:variable name="reportType" select="./@reportTitle" />
<xsl:variable name="threshold">
<xsl:choose>
<xsl:when test="$reportType = 'Module Class Function Summary'"><xsl:value-of select="./project/@acceptableFunction" /></xsl:when>
<xsl:otherwise><xsl:value-of select="./project/@acceptable" /></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="unvisitedTitle">
<xsl:choose>
<xsl:when test="$reportType = 'Module Class Function Summary'">Unvisited Functions</xsl:when>
<xsl:otherwise>Unvisited SeqPts</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="coverageTitle">
<xsl:choose>
<xsl:when test="$reportType = 'Module Class Function Summary'">Function Coverage</xsl:when>
<xsl:otherwise>Coverage</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="header" />
<xsl:call-template name="projectSummary">
<xsl:with-param name="threshold" select="$threshold" />
<xsl:with-param name="unvisitedTitle" select="$unvisitedTitle" />
<xsl:with-param name="coverageTitle" select="$coverageTitle" />
<xsl:with-param name="reportType" select="$reportType" />
</xsl:call-template>
<xsl:if test="$reportType != 'Namespace Summary'">
<xsl:call-template name="moduleSummary">
<xsl:with-param name="threshold" select="$threshold" />
<xsl:with-param name="unvisitedTitle" select="$unvisitedTitle" />
<xsl:with-param name="coverageTitle" select="$coverageTitle" />
</xsl:call-template>
</xsl:if>
<xsl:if test="$reportType = 'Module Namespace Summary'">
<xsl:call-template name="moduleNamespaceSummary">
<xsl:with-param name="threshold" select="$threshold" />
</xsl:call-template>
</xsl:if>
<xsl:if test="($reportType = 'Module Class Summary') or ($reportType = 'Module Class Function Summary')">
<xsl:call-template name="classModuleSummary">
<xsl:with-param name="threshold" select="$threshold" />
<xsl:with-param name="unvisitedTitle" select="$unvisitedTitle" />
<xsl:with-param name="coverageTitle" select="$coverageTitle" />
</xsl:call-template>
</xsl:if>
<xsl:if test="$reportType = 'Namespace Summary'">
<xsl:call-template name="namespaceSummary">
<xsl:with-param name="threshold" select="$threshold" />
</xsl:call-template>
</xsl:if>
<xsl:if test="count(./exclusions/exclusion) != 0">
<xsl:call-template name="exclusionsSummary" />
</xsl:if>
<xsl:call-template name="footer" />
</xsl:template>
<!-- Report Header -->
<xsl:template name="header">
<tr>
<td class="projectTable reportHeader" colspan="5">
<table width="100%">
<tbody>
<tr>
<td valign="top">
<h1 class="titleText">NCoverExplorer Coverage Report - <xsl:value-of select="./project/@name" />&#160;&#160;</h1>
<table cellpadding="1" class="subtitleText">
<tbody>
<tr>
<td class="heading">Report generated on:</td>
<td><xsl:value-of select="./@date" />&#160;at&#160;<xsl:value-of select="./@time" /></td>
</tr>
<tr>
<td class="heading">NCoverExplorer version:</td>
<td><xsl:value-of select="./@version" /></td>
</tr>
<tr>
<td class="heading">Filtering / Sorting:</td>
<td><xsl:value-of select="./project/@filteredBy" />&#160;/&#160;<xsl:value-of select="./project/@sortedBy" /></td>
</tr>
</tbody>
</table>
</td>
<td class="projectStatistics" align="right" valign="top">
<table cellpadding="1">
<tbody>
<tr>
<td rowspan="4" valign="top" nowrap="true" class="heading">Project Statistics:</td>
<td align="right" class="heading">Files:</td>
<td align="right"><xsl:value-of select="./project/@files" /></td>
<td rowspan="4">&#160;</td>
<td align="right" class="heading">NCLOC:</td>
<td align="right"><xsl:value-of select="./project/@nonCommentLines" /></td>
</tr>
<tr>
<td align="right" class="heading">Classes:</td>
<td align="right"><xsl:value-of select="./project/@classes" /></td>
<td align="right" class="heading">&#160;</td>
<td align="right">&#160;</td>
</tr>
<tr>
<td align="right" class="heading">Functions:</td>
<td align="right"><xsl:value-of select="./project/@members" /></td>
<td align="right" class="heading">Unvisited:</td>
<td align="right"><xsl:value-of select="./project/@unvisitedFunctions" /></td>
</tr>
<tr>
<td align="right" class="heading">Seq Pts:</td>
<td align="right"><xsl:value-of select="./project/@sequencePoints" /></td>
<td align="right" class="heading">Unvisited:</td>
<td align="right"><xsl:value-of select="./project/@unvisitedPoints" /></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</xsl:template>
<!-- Project Summary -->
<xsl:template name="projectSummary">
<xsl:param name="threshold" />
<xsl:param name="unvisitedTitle" />
<xsl:param name="coverageTitle" />
<xsl:param name="reportType" />
<tr>
<td colspan="5">&#160;</td>
</tr>
<tr>
<td class="projectTable mainTableHeaderLeft">Project</td>
<td class="projectTable mainTableHeader">Acceptable</td>
<td class="projectTable mainTableHeader"><xsl:value-of select="$unvisitedTitle" /></td>
<td class="projectTable mainTableGraphHeader" colspan="2"><xsl:value-of select="$coverageTitle" /></td>
</tr>
<xsl:call-template name="coverageDetail">
<xsl:with-param name="name" select="./project/@name" />
<xsl:with-param name="unvisitedPoints">
<xsl:choose>
<xsl:when test="$reportType = 'Module Class Function Summary'"><xsl:value-of select="./project/@unvisitedFunctions" /></xsl:when>
<xsl:otherwise><xsl:value-of select="./project/@unvisitedPoints" /></xsl:otherwise>
</xsl:choose>
</xsl:with-param>
<xsl:with-param name="sequencePoints">
<xsl:choose>
<xsl:when test="$reportType = 'Module Class Function Summary'"><xsl:value-of select="./project/@members" /></xsl:when>
<xsl:otherwise><xsl:value-of select="./project/@sequencePoints" /></xsl:otherwise>
</xsl:choose>
</xsl:with-param>
<xsl:with-param name="coverage">
<xsl:choose>
<xsl:when test="$reportType = 'Module Class Function Summary'"><xsl:value-of select="./project/@functionCoverage" /></xsl:when>
<xsl:otherwise><xsl:value-of select="./project/@coverage" /></xsl:otherwise>
</xsl:choose>
</xsl:with-param>
<xsl:with-param name="threshold" select="$threshold" />
<xsl:with-param name="showThreshold">True</xsl:with-param>
</xsl:call-template>
</xsl:template>
<!-- Modules Summary -->
<xsl:template name="moduleSummary">
<xsl:param name="threshold" />
<xsl:param name="unvisitedTitle" />
<xsl:param name="coverageTitle" />
<tr>
<td colspan="5">&#160;</td>
</tr>
<tr>
<td class="primaryTable mainTableHeaderLeft">Modules</td>
<td class="primaryTable mainTableHeader">Acceptable</td>
<td class="primaryTable mainTableHeader"><xsl:value-of select="$unvisitedTitle" /></td>
<td class="primaryTable mainTableGraphHeader" colspan="2"><xsl:value-of select="$coverageTitle" /></td>
</tr>
<xsl:for-each select="./modules/module">
<xsl:call-template name="coverageDetail">
<xsl:with-param name="name" select="./@name" />
<xsl:with-param name="unvisitedPoints" select="./@unvisitedPoints" />
<xsl:with-param name="sequencePoints" select="./@sequencePoints" />
<xsl:with-param name="coverage" select="./@coverage" />
<xsl:with-param name="threshold" select="./@acceptable" />
<xsl:with-param name="showThreshold">True</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<!-- Namespaces per Module Summary -->
<xsl:template name="moduleNamespaceSummary">
<xsl:param name="threshold" />
<xsl:for-each select="./modules/module">
<tr>
<td colspan="5">&#160;</td>
</tr>
<tr>
<td class="secondaryTable mainTableHeaderLeft">Module</td>
<td class="secondaryTable mainTableHeader">Acceptable</td>
<td class="secondaryTable mainTableHeader">Unvisited SeqPts</td>
<td class="secondaryTable mainTableGraphHeader" colspan="2">Coverage</td>
</tr>
<xsl:call-template name="coverageDetailSecondary">
<xsl:with-param name="name" select="./@name" />
<xsl:with-param name="unvisitedPoints" select="./@unvisitedPoints" />
<xsl:with-param name="sequencePoints" select="./@sequencePoints" />
<xsl:with-param name="coverage" select="./@coverage" />
<xsl:with-param name="threshold" select="./@acceptable" />
</xsl:call-template>
<tr>
<td class="secondaryChildTable childTableHeader" colspan="5">Namespaces</td>
</tr>
<xsl:for-each select="./namespace">
<xsl:call-template name="coverageIndentedDetail">
<xsl:with-param name="name" select="./@name" />
<xsl:with-param name="unvisitedPoints" select="./@unvisitedPoints" />
<xsl:with-param name="sequencePoints" select="./@sequencePoints" />
<xsl:with-param name="coverage" select="./@coverage" />
<xsl:with-param name="threshold" select="./../@acceptable" />
</xsl:call-template>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
<!-- Classes per Namespace per Module Summary -->
<xsl:template name="classModuleSummary">
<xsl:param name="threshold" />
<xsl:param name="unvisitedTitle" />
<xsl:param name="coverageTitle" />
<xsl:for-each select="./modules/module">
<tr>
<td colspan="5">&#160;</td>
</tr>
<tr>
<td class="secondaryTable mainTableHeaderLeft">Module</td>
<td class="secondaryTable mainTableHeader">Acceptable</td>
<td class="secondaryTable mainTableHeader"><xsl:value-of select="$unvisitedTitle" /></td>
<td class="secondaryTable mainTableGraphHeader" colspan="2"><xsl:value-of select="$coverageTitle" /></td>
</tr>
<xsl:call-template name="coverageDetailSecondary">
<xsl:with-param name="name" select="./@name" />
<xsl:with-param name="unvisitedPoints" select="./@unvisitedPoints" />
<xsl:with-param name="sequencePoints" select="./@sequencePoints" />
<xsl:with-param name="coverage" select="./@coverage" />
<xsl:with-param name="threshold" select="./@acceptable" />
</xsl:call-template>
<tr>
<td class="secondaryChildTable childTableHeader" colspan="5">Namespace / Classes</td>
</tr>
<xsl:for-each select="./namespace">
<xsl:call-template name="coverageIndentedDetail">
<xsl:with-param name="name" select="./@name" />
<xsl:with-param name="unvisitedPoints" select="./@unvisitedPoints" />
<xsl:with-param name="sequencePoints" select="./@sequencePoints" />
<xsl:with-param name="coverage" select="./@coverage" />
<xsl:with-param name="threshold" select="../@acceptable" />
<xsl:with-param name="styleTweak">padding-left:20px;font-weight:bold</xsl:with-param>
</xsl:call-template>
<xsl:for-each select="./class">
<xsl:call-template name="coverageIndentedDetail">
<xsl:with-param name="name" select="./@name" />
<xsl:with-param name="unvisitedPoints" select="./@unvisitedPoints" />
<xsl:with-param name="sequencePoints" select="./@sequencePoints" />
<xsl:with-param name="coverage" select="./@coverage" />
<xsl:with-param name="threshold" select="../../@acceptable" />
<xsl:with-param name="styleTweak">padding-left:30px</xsl:with-param>
<xsl:with-param name="scale">160</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
<!-- Namespaces Summary -->
<xsl:template name="namespaceSummary">
<xsl:param name="threshold" />
<tr>
<td colspan="5">&#160;</td>
</tr>
<tr>
<td class="primaryTable mainTableHeaderLeft" colspan="2">Namespaces</td>
<td class="primaryTable mainTableHeader">Unvisited SeqPts</td>
<td class="primaryTable mainTableGraphHeader" colspan="2">Coverage</td>
</tr>
<xsl:for-each select="./namespaces/namespace">
<xsl:call-template name="coverageDetail">
<xsl:with-param name="name" select="./@name" />
<xsl:with-param name="unvisitedPoints" select="./@unvisitedPoints" />
<xsl:with-param name="sequencePoints" select="./@sequencePoints" />
<xsl:with-param name="coverage" select="./@coverage" />
<xsl:with-param name="threshold" select="$threshold" />
<xsl:with-param name="showThreshold">False</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<!-- Coverage detail row in main grid displaying a name, statistics and graph bar -->
<xsl:template name="coverageDetail">
<xsl:param name="name" />
<xsl:param name="unvisitedPoints" />
<xsl:param name="sequencePoints" />
<xsl:param name="coverage" />
<xsl:param name="threshold" />
<xsl:param name="showThreshold" />
<tr>
<xsl:choose>
<xsl:when test="$showThreshold='True'">
<td class="mainTableCellBottom mainTableCellItem"><xsl:value-of select="$name" /></td>
<td class="mainTableCellBottom mainTableCellData"><xsl:value-of select="concat(format-number($threshold,'#0.0'), ' %')" /></td>
</xsl:when>
<xsl:otherwise>
<td class="mainTableCellBottom mainTableCellItem" colspan="2"><xsl:value-of select="$name" /></td>
</xsl:otherwise>
</xsl:choose>
<td class="mainTableCellBottom mainTableCellData"><xsl:value-of select="$unvisitedPoints" /></td>
<td class="mainTableCellBottom mainTableCellPercent"><xsl:value-of select="concat(format-number($coverage,'#0.0'), ' %')" /></td>
<td class="mainTableCellBottom mainTableCellGraph">
<xsl:call-template name="detailPercent">
<xsl:with-param name="notVisited" select="$unvisitedPoints" />
<xsl:with-param name="total" select="$sequencePoints" />
<xsl:with-param name="threshold" select="$threshold" />
<xsl:with-param name="scale" select="200" />
</xsl:call-template>
</td>
</tr>
</xsl:template>
<!-- Coverage detail row in secondary grid header displaying a name, statistics and graph bar -->
<xsl:template name="coverageDetailSecondary">
<xsl:param name="name" />
<xsl:param name="unvisitedPoints" />
<xsl:param name="sequencePoints" />
<xsl:param name="coverage" />
<xsl:param name="threshold" />
<tr>
<td class="mainTableCellItem"><xsl:value-of select="$name" /></td>
<td class="mainTableCellData"><xsl:value-of select="concat(format-number($threshold,'#0.0'), ' %')" /></td>
<td class="mainTableCellData"><xsl:value-of select="$unvisitedPoints" /></td>
<td class="mainTableCellPercent"><xsl:value-of select="concat(format-number($coverage,'#0.0'), ' %')" /></td>
<td class="mainTableCellGraph">
<xsl:call-template name="detailPercent">
<xsl:with-param name="notVisited" select="$unvisitedPoints" />
<xsl:with-param name="total" select="$sequencePoints" />
<xsl:with-param name="threshold" select="$threshold" />
<xsl:with-param name="scale" select="200" />
</xsl:call-template>
</td>
</tr>
</xsl:template>
<!-- Coverage detail row with indented item name and shrunk graph bar -->
<xsl:template name="coverageIndentedDetail">
<xsl:param name="name" />
<xsl:param name="unvisitedPoints" />
<xsl:param name="sequencePoints" />
<xsl:param name="coverage" />
<xsl:param name="threshold" />
<xsl:param name="styleTweak">padding-left:20px</xsl:param>
<xsl:param name="scale">180</xsl:param>
<tr>
<td class="mainTableCellBottom childTableCellIndentedItem" colspan="2"><xsl:attribute name="style"><xsl:value-of select="$styleTweak"/></xsl:attribute><xsl:value-of select="$name" /></td>
<td class="mainTableCellBottom mainTableCellData"><xsl:value-of select="$unvisitedPoints" /></td>
<td class="mainTableCellBottom mainTableCellPercent"><xsl:value-of select="concat(format-number($coverage,'#0.0'), ' %')" /></td>
<td class="mainTableCellBottom mainTableCellGraph">
<xsl:call-template name="detailPercent">
<xsl:with-param name="notVisited" select="$unvisitedPoints" />
<xsl:with-param name="total" select="$sequencePoints" />
<xsl:with-param name="threshold" select="$threshold" />
<xsl:with-param name="scale" select="$scale" />
</xsl:call-template>
</td>
</tr>
</xsl:template>
<!-- Exclusions Summary -->
<xsl:template name="exclusionsSummary">
<tr>
<td colspan="5">&#160;</td>
</tr>
<tr>
<td class="exclusionTable mainTableHeaderLeft" colspan="3">Excluded From Coverage Results</td>
<td class="exclusionTable mainTableGraphHeader" colspan="2">All Code Within</td>
</tr>
<xsl:for-each select="./exclusions/exclusion">
<tr>
<td class="mainTableCellBottom exclusionTableCellItem" colspan="3"><xsl:value-of select="@name" /></td>
<td class="mainTableCellBottom mainTableCellGraph" colspan="2"><xsl:value-of select="@category" /></td>
</tr>
</xsl:for-each>
</xsl:template>
<!-- Footer -->
<xsl:template name="footer">
<tr>
<td colspan="5">&#160;</td>
</tr>
</xsl:template>
<!-- Draw % Green/Red/Yellow Bar -->
<xsl:template name="detailPercent">
<xsl:param name="notVisited" />
<xsl:param name="total" />
<xsl:param name="threshold" />
<xsl:param name="scale" />
<xsl:variable name="visited" select="$total - $notVisited" />
<xsl:variable name="coverage" select="$visited div $total * 100"/>
<table cellpadding="0" cellspacing="0">
<tbody>
<tr>
<xsl:if test="$notVisited = 0">
<td class="graphBarVisitedFully" height="14">
<xsl:attribute name="width">
<xsl:value-of select="$scale" />
</xsl:attribute>.</td>
</xsl:if>
<xsl:if test="($visited != 0) and ($notVisited != 0)">
<td class="graphBarVisited" height="14">
<xsl:attribute name="width">
<xsl:value-of select="format-number($coverage div 100 * $scale, '0') - 1" />
</xsl:attribute>.</td>
</xsl:if>
<xsl:if test="$notVisited != 0">
<td height="14">
<xsl:attribute name="class">
<xsl:if test="$coverage &gt;= $threshold">graphBarSatisfactory</xsl:if>
<xsl:if test="$coverage &lt; $threshold">graphBarNotVisited</xsl:if>
</xsl:attribute>
<xsl:attribute name="width">
<xsl:value-of select="format-number($notVisited div $total * $scale, '0')" />
</xsl:attribute>.</td>
</xsl:if>
</tr>
</tbody>
</table>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,126 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/xhtml1/strict">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:apply-templates select="//coverageReport" />
</xsl:template>
<xsl:template match="coverageReport">
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<tr>
<td class="sectionheader" colspan="4">
NCoverExplorer Code Coverage Summary: <xsl:value-of select="./project/@name"/>
</td>
</tr>
<tr>
<td class="header-label" width="300px">
Module
<br/><img src="..\images\shim.gif" width="300px" height="1px" />
</td>
<td class="header-label" width="100px">
Coverage %
<br/><img src="..\images\shim.gif" width="100px" height="1px" />
</td>
<td class="header-label" width="110px">
Acceptance %
<br/><img src="..\images\shim.gif" width="110px" height="1px" />
</td>
<td class="header-label" width="100%">
Verdict
</td>
</tr>
<xsl:for-each select="./modules/module">
<xsl:call-template name="ModuleSummary" />
</xsl:for-each>
<tr>
<td class="header-label">
<xsl:value-of select="./project/@name"/>&#160;Total
</td>
<td class="header-label">
<xsl:value-of select="format-number(./project/@coverage, '0.0')"/>%
</td>
<td class="header-label">
<xsl:value-of select="./project/@acceptable"/>%
</td>
<td class="header-label">
<xsl:if test="./project/@coverage &lt; ./project/@acceptable">
<span style="color:red">FAIL</span>
</xsl:if>
<xsl:if test="./project/@coverage &gt;= ./project/@acceptable">
<span style="color:green">PASS</span>
</xsl:if>
</td>
</tr>
<tr>
<td colspan="4">&#160;</td>
</tr>
<tr class="section-oddrow">
<td>
Unvisited Sequence Points:
</td>
<td>
<xsl:value-of select="./project/@unvisitedPoints"/>
</td>
<td>
Files:
</td>
<td>
<xsl:value-of select="./project/@files"/>
</td>
</tr>
<tr>
<td>
Total Sequence Points:
</td>
<td>
<xsl:value-of select="./project/@sequencePoints"/>
</td>
<td>
Classes
</td>
<td>
<xsl:value-of select="./project/@classes"/>
</td>
</tr>
<tr class="section-oddrow">
<td>
Non Comment Lines:
</td>
<td>
<xsl:value-of select="./project/@nonCommentLines"/>
</td>
<td>
Functions:
</td>
<td>
<xsl:value-of select="./project/@members"/>
</td>
</tr>
</table>
</xsl:template>
<!-- Display a summary of each module and whether it passed -->
<xsl:template name="ModuleSummary">
<tr>
<xsl:if test="position() mod 2 = 1">
<xsl:attribute name="class">section-oddrow</xsl:attribute>
</xsl:if>
<td>
<xsl:value-of select="@name"/>
</td>
<td>
<xsl:value-of select="format-number(@coverage, '0.0')"/>%
</td>
<td>
<xsl:value-of select="@acceptable"/>%
</td>
<td>
<xsl:if test="@coverage &lt; @acceptable">
<span style="color:red">FAIL</span>
</xsl:if>
<xsl:if test="@coverage &gt;= @acceptable">
<span style="color:green">PASS</span>
</xsl:if>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
+30
View File
@@ -0,0 +1,30 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/xhtml1/strict">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:apply-templates select="//coverage[count(module) != 0]" />
</xsl:template>
<xsl:template match="coverage">
<xsl:variable name="covered.lines" select="count(//coverage/module/method/seqpnt[@visitcount > 0])" />
<xsl:variable name="uncovered.lines" select="count(//coverage/module/method/seqpnt[@visitcount = 0])" />
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<tr>
<td class="sectionheader" colspan="3">
NCover results:
</td>
</tr>
<tr>
<td>
Covered lines: <xsl:value-of select="$covered.lines"/>
</td>
<td>
Uncovered lines: <xsl:value-of select="$uncovered.lines"/>
</td>
<td>
Total coverage: <xsl:value-of select="round($covered.lines div ($uncovered.lines + $covered.lines) * 100)"/>%
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>
+266
View File
@@ -0,0 +1,266 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:apply-templates select="/cruisecontrol/build/CoverageReport" />
</xsl:template>
<xsl:template match="/cruisecontrol/build/CoverageReport">
<link rel="stylesheet" type="text/css" href="/ccnet/ReportGenerator.css" />
<script src="/ccnet/javascript/ReportGenerator.js"></script>
<h1 class="sectionheader">
Code Coverage Report
</h1>
<table class="overview">
<colgroup>
<col width="130" />
<col />
</colgroup>
<tr>
<td class="sectionheader">
Generated on:
</td>
<td>
<xsl:value-of select="Summary/Generatedon"/>
</td>
</tr>
<tr>
<td class="sectionheader">
Parser:
</td>
<td>
<xsl:value-of select="Summary/Parser"/>
</td>
</tr>
<tr>
<td class="sectionheader">
Assemblies:
</td>
<td>
<xsl:value-of select="Summary/Assemblies"/>
</td>
</tr>
<tr>
<td class="sectionheader">
Files:
</td>
<td>
<xsl:value-of select="Summary/Files"/>
</td>
</tr>
<tr>
<td class="sectionheader">
Coverage:
</td>
<td>
<xsl:value-of select="Summary/Coverage"/>
</td>
</tr>
<tr>
<td class="sectionheader">
Covered lines:
</td>
<td>
<xsl:value-of select="Summary/Coveredlines"/>
</td>
</tr>
<tr>
<td class="sectionheader">
Coverable lines:
</td>
<td>
<xsl:value-of select="Summary/Coverablelines"/>
</td>
</tr>
<tr>
<td class="sectionheader">
Total lines:
</td>
<td>
<xsl:value-of select="Summary/Totallines"/>
</td>
</tr>
</table>
<h1 class="sectionheader">
Assemblies
</h1>
<p class="toggleClasses">
<a id="collapseAllClasses" style="text-decoration: none;color:red;font-size:10px" href="#">Collapse all classes</a> | <a id="expandAllClasses" style="text-decoration: none;color:red;font-size:10px" href="#">Expand all classes</a>
</p>
<table class="overview">
<colgroup>
<col />
<col width="60" />
<col width="105" />
</colgroup>
<xsl:for-each select="./Assemblies/Assembly">
<xsl:sort select="@name"/>
<xsl:variable name="ModulenameVariable" select="@name"/>
<tr class="expanded">
<th class="expanded">
<a href="#" class="toggleClassesInAssembly" style="text-decoration: none;color:red;font-size:10px" title="Collapse/Expand classes"/>
<xsl:value-of select="@name"/>
<a href="#" class="toggleDetails" style="text-decoration: none;color:red;font-size:10px" title="Show details of assembly">Details</a>
<div class="detailspopup">
<table class="overview">
<colgroup>
<col width="130" />
<col />
</colgroup>
<tr>
<td class="sectionheader">
Assembly:
</td>
<td>
<xsl:value-of select="@name"/>
</td>
</tr>
<tr>
<td class="sectionheader">
Classes:
</td>
<td>
<xsl:value-of select="@classes"/>
</td>
</tr>
<tr>
<td class="sectionheader">
Coverage:
</td>
<td>
<xsl:value-of select="@coverage"/>%
</td>
</tr>
<tr>
<td class="sectionheader">
Covered lines:
</td>
<td>
<xsl:value-of select="@coveredlines"/>
</td>
</tr>
<tr>
<td class="sectionheader">
Coverable lines:
</td>
<td>
<xsl:value-of select="@coverablelines"/>
</td>
</tr>
<tr>
<td class="sectionheader">
Total lines:
</td>
<td>
<xsl:value-of select="@totallines"/>
</td>
</tr>
</table>
</div>
</th>
<th title="LineCoverage">
<xsl:value-of select="@coverage"/>%
</th>
<td>
<xsl:variable name="width" select="@coverage"/>
<table class="coverage">
<tr>
<td class="green" style="width: {$width}px;">
&#160;
</td>
<td class="red" style="width: {100-$width}px;">
&#160;
</td>
</tr>
</table>
</td>
</tr>
<xsl:for-each select="Class">
<tr class="classrow">
<td>
<xsl:value-of select="@name"/>
<a href="#" class="toggleDetails" style="text-decoration: none;color:red;font-size:10px" title="Show details of class">Details</a>
<div class="detailspopup">
<table class="overview">
<colgroup>
<col width="130" />
<col />
</colgroup>
<tr>
<td class="sectionheader">
Class:
</td>
<td>
<xsl:value-of select="@name"/>
</td>
</tr>
<tr>
<td class="sectionheader">
Coverage:
</td>
<td>
<xsl:value-of select="@coverage"/>%
</td>
</tr>
<tr>
<td class="sectionheader">
Covered lines:
</td>
<td>
<xsl:value-of select="@coveredlines"/>
</td>
</tr>
<tr>
<td class="sectionheader">
Coverable lines:
</td>
<td>
<xsl:value-of select="@coverablelines"/>
</td>
</tr>
<tr>
<td class="sectionheader">
Total lines:
</td>
<td>
<xsl:value-of select="@totallines"/>
</td>
</tr>
</table>
</div>
</td>
<td title="LineCoverage">
<xsl:value-of select="@coverage"/>%
</td>
<td>
<table class="coverage">
<tr width="100px">
<xsl:variable name="width" select="round(@coverage)"/>
<xsl:choose>
<xsl:when test="$width &lt;= 0">
<td class="red" style="width: 103px;">
&#160;
</td>
</xsl:when>
<xsl:when test="$width &gt;= 100">
<td class="green" style="width: 103px;">
&#160;
</td>
</xsl:when>
<xsl:otherwise>
<td class="green" style="width: {$width}px;">
&#160;
</td>
<td class="red" style="width: {100-$width}px;">
&#160;
</td>
</xsl:otherwise>
</xsl:choose>
</tr>
</table>
</td>
</tr>
</xsl:for-each>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,130 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:apply-templates select="/cruisecontrol/build/CoverageReport" />
</xsl:template>
<xsl:template match="/cruisecontrol/build/CoverageReport">
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<tr>
<td class="sectionheader" colspan="4">
Code Coverage Summary
</td>
</tr>
<tr>
<td class="header-label" width="300px">
Module
<br/><img src="..\images\shim.gif" width="300px" height="1px" />
</td>
<td class="header-label" width="100px">
Coverage %
<br/><img src="..\images\shim.gif" width="100px" height="1px" />
</td>
<td class="header-label" width="110px">
Acceptance %
<br/><img src="..\images\shim.gif" width="110px" height="1px" />
</td>
<td class="header-label" width="100%">
Verdict
</td>
</tr>
<xsl:for-each select="./Assemblies/Assembly">
<xsl:call-template name="AssemblySummary" />
</xsl:for-each>
<tr>
<td class="header-label">
Total
</td>
<td class="header-label">
<xsl:value-of select="Summary/Coverage"/>
</td>
<td class="header-label">
95%
</td>
<td class="header-label">
<xsl:choose>
<xsl:when test="substring-before(Summary/Coverage,'%') &lt; 95">
<span style="color:red">FAIL</span>
</xsl:when>
<xsl:otherwise>
<span style="color:green">PASS</span>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
<tr>
<td colspan="4">&#160;</td>
</tr>
<tr class="section-oddrow">
<td>
Covered lines:
</td>
<td>
<xsl:value-of select="Summary/Coveredlines"/>
</td>
<td>
Assemblies:
</td>
<td>
<xsl:value-of select="Summary/Assemblies"/>
</td>
</tr>
<tr>
<td>
Coverable lines:
</td>
<td>
<xsl:value-of select="Summary/Coverablelines"/>
</td>
<td>
Files:
</td>
<td>
<xsl:value-of select="Summary/Files"/>
</td>
</tr>
<tr class="section-oddrow">
<td>
Total Lines:
</td>
<td>
<xsl:value-of select="Summary/Totallines"/>
</td>
<td>
&#160;
</td>
<td>
&#160;
</td>
</tr>
</table>
</xsl:template>
<!-- Display a summary of each assembly and whether it passed -->
<xsl:template name="AssemblySummary">
<tr>
<xsl:if test="position() mod 2 = 1">
<xsl:attribute name="class">section-oddrow</xsl:attribute>
</xsl:if>
<td>
<xsl:value-of select="@name"/>
</td>
<td>
<xsl:value-of select="format-number(@coverage, '0.0')"/>%
</td>
<td>
80%
</td>
<td>
<xsl:choose>
<xsl:when test="@coverage &lt; 80">
<span style="color:red">FAIL</span>
</xsl:when>
<xsl:otherwise>
<span style="color:green">PASS</span>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
+115
View File
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<!--
Cruisecontrol.NET dashboard xsl file for Sandcastle Help File Builder
Jim Graham, Scimatic Software www.scimatic.com
29/01/2009
License: MS-Pl (see http://www.opensource.org/licenses/ms-pl.html)
Based on TransformBuildLog.xsl, (see below for inline copyright in that file)
in the Sandcastle Help File Builder v1.7.0.0, released under the MS-Pl
license (see http://www.codeplex.com/SHFB, http://www.codeplex.com/SHFB/license)
// System : Sandcastle Help File Builder
// File : BuildLog.xsl
// Author : Eric Woodruff
// Updated : 03/15/2008
// Note : Copyright 2008, Eric Woodruff, All rights reserved
//
// This is used to convert a SHFB build log into a viewable HTML page.
-->
<xsl:output method="html"/>
<xsl:variable name="shfb.root" select="//shfbBuild"/>
<!-- Main template for the log -->
<xsl:template match="/">
<div id="shfb-summary" xmlns="http://schemas.microsoft.com/intellisense/ie5">
<script>
// Expand/collapse a section
function ExpandCollapse(showId, hideId)
{
var showSpan = document.getElementById(showId),
hideSpan = document.getElementById(hideId);
showSpan.style.display = "inline";
hideSpan.style.display = "none";
}
// Expand or collapse all sections
function ExpandCollapseAll(expand)
{
var spans = document.getElementsByTagName("span")
var spanIdx, id;
for(spanIdx = 0; spanIdx != spans.length - 1; spanIdx++)
{
id = spans[spanIdx].getAttribute('id');
<xsl:text disable-output-escaping="yes">
<![CDATA[
if(id != null && id.substr(0, 4) == "col_")
]]>
</xsl:text>
{
if(expand)
ExpandCollapse("exp_" + id.substr(4), id);
else
ExpandCollapse(id, "exp_" + id.substr(4));
}
}
}
</script>
<xsl:apply-templates select="$shfb.root"/>
</div>
</xsl:template>
<xsl:template match="shfbBuild">
<table class="section-table" cellSpacing="0" cellPadding="2" width="98%" border="0">
<tr><td class="sectionheader"><xsl:value-of select="@product"/> <xsl:value-of select="@version"/> Build Log</td></tr>
<tr><td>Project File: <xsl:value-of select="@projectFile"/></td></tr>
<tr><td>Build Started: <xsl:value-of select="@started"/></td></tr>
<tr><td><a href="#" onclick="javascript: ExpandCollapseAll(false);">Collapse All</a><xsl:text disable-output-escaping="yes"><![CDATA[ &nbsp;&nbsp;&nbsp;&nbsp; ]]></xsl:text><a href="#" onclick="javascript: ExpandCollapseAll(true);">Expand All</a></td></tr>
<!-- Process the build steps -->
<xsl:apply-templates select="//shfbBuild/buildStep" />
<tr><td><a href="#" onclick="javascript: ExpandCollapseAll(false);">Collapse All</a><xsl:text disable-output-escaping="yes"><![CDATA[ &nbsp;&nbsp;&nbsp;&nbsp; ]]></xsl:text>
<a href="#" onclick="javascript: ExpandCollapseAll(true);">Expand All</a></td></tr>
</table>
</xsl:template>
<!-- Build step template -->
<xsl:template match="//shfbBuild/buildStep">
<tr>
<td>
<span id="col_{@step}" style="display: none;">
<span class="CollapseBox" onclick="javascript: ExpandCollapse('exp_{@step}', 'col_{@step}');">+</span>
<span>
<span class="sectionheader"><xsl:value-of select="@step"/></span><br/><br/>
</span>
</span>
<span id="exp_{@step}" style="display: inline;">
<span class="CollapseBox" onclick="javascript: ExpandCollapse('col_{@step}', 'exp_{@step}');">-</span>
<span class="sectionheader"><xsl:value-of select="@step"/></span><br/><br/>
<pre>
<xsl:apply-templates />
</pre>
</span>
</td>
</tr>
</xsl:template>
<!-- Text template -->
<xsl:template match="text()">
<xsl:value-of select="." disable-output-escaping="yes" />
</xsl:template>
</xsl:stylesheet>
+53
View File
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<!--
Cruisecontrol.NET dashboard xsl file for Sandcastle Help File Builder
Jim Graham, Scimatic Software www.scimatic.com
29/01/2009
License: MS-Pl (see http://www.opensource.org/licenses/ms-pl.html)
Based on TransformBuildLog.xsl, (see below for inline copyright in that file)
in the Sandcastle Help File Builder v1.7.0.0, released under the MS-Pl
license (see http://www.codeplex.com/SHFB, http://www.codeplex.com/SHFB/license)
// System : Sandcastle Help File Builder
// File : BuildLog.xsl
// Author : Eric Woodruff
// Updated : 03/15/2008
// Note : Copyright 2008, Eric Woodruff, All rights reserved
//
// This is used to convert a SHFB build log into a viewable HTML page.
-->
<xsl:output method="html"/>
<xsl:variable name="shfb.root" select="//shfbBuild"/>
<!-- Main template for the log -->
<xsl:template match="/">
<div id="shfb-summary" xmlns="http://schemas.microsoft.com/intellisense/ie5">
<xsl:apply-templates select="$shfb.root"/>
</div>
</xsl:template>
<xsl:template match="shfbBuild">
<table class="section-table" cellSpacing="0" cellPadding="2" width="98%" border="0">
<tr><td class="sectionheader"><xsl:value-of select="@product"/> <xsl:value-of select="@version"/> Build Log</td></tr>
<tr><td>Project File: <xsl:value-of select="@projectFile"/></td></tr>
<tr><td>Build Started: <xsl:value-of select="@started"/></td></tr>
<!-- Process the build steps -->
<xsl:apply-templates select="//shfbBuild/buildStep" />
</table>
</xsl:template>
<!-- Build step template -->
<xsl:template match="//shfbBuild/buildStep">
<tr>
<td><xsl:value-of select="@step"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>
+97
View File
@@ -0,0 +1,97 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/TR/xhtml1/strict">
<xsl:output method="html"/>
<xsl:variable name="simian.root" select="//simian"/>
<xsl:variable name="simian.version" select="$simian.root/@version" />
<xsl:template match="/">
<div id="simian-report">
<table class="section-table" cellSpacing="0" cellPadding="2" width="98%" border="0">
<tr>
<td class="sectionheader" colSpan="4">Simian <xsl:value-of select="$simian.version" /> Report</td>
</tr>
<xsl:apply-templates select="$simian.root//check"/>
</table>
</div>
</xsl:template>
<xsl:template match="check">
<tr>
<td><b><xsl:text>Configuration</xsl:text></b></td>
</tr>
<xsl:for-each select="./@*" >
<tr>
<td class="section-data">
<xsl:value-of select="name()"/>
</td>
<td class="section-data">
<xsl:value-of select="."/>
</td>
<td/>
<td/>
</tr>
</xsl:for-each>
<tr>
<td><b><xsl:text>Results</xsl:text></b></td>
</tr>
<xsl:apply-templates select="./set"/>
<tr>
<td><b><xsl:text>Summary</xsl:text></b></td>
</tr>
<xsl:apply-templates select="./summary"/>
</xsl:template>
<xsl:template match="set">
<xsl:for-each select="./@*" >
<tr>
<td class="section-data">
<xsl:value-of select="name()"/>
</td>
<td class="section-data">
<xsl:value-of select="."/>
</td>
<td/>
<td/>
</tr>
</xsl:for-each>
<xsl:for-each select="./block" >
<tr>
<td class="section-data">
<xsl:value-of select="./@sourceFile"/>
</td>
<td class="section-data">
<xsl:value-of select="./@startLineNumber"/>
</td>
<td class="section-data">
<xsl:value-of select="./@endLineNumber"/>
</td>
<td/>
</tr>
</xsl:for-each>
<tr>
<td colspan="4">
<hr size="1" width="100%" color="#888888"/>
</td>
</tr>
</xsl:template>
<xsl:template match="summary">
<xsl:for-each select="./@*" >
<tr>
<td class="section-data">
<xsl:value-of select="name()"/>
</td>
<td class="section-data">
<xsl:value-of select="."/>
</td>
<td/>
<td/>
</tr>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
+56
View File
@@ -0,0 +1,56 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://schemas.microsoft.com/intellisense/ie5">
<xsl:output method="html"/>
<xsl:variable name="simian.root" select="//simian"/>
<xsl:variable name="simian.version" select="$simian.root/@version" />
<xsl:template match="/">
<xsl:if test="$simian.version!=''">
<div id="simian-summary">
<table class="section-table" cellSpacing="0" cellPadding="2" width="98%" border="0">
<tr>
<td class="sectionheader" colSpan="4">Simian <xsl:value-of select="$simian.version" /> Summary</td>
</tr>
<tr>
<td><b><xsl:text>Configuration</xsl:text></b></td>
</tr>
<xsl:apply-templates select="$simian.root//check"/>
</table>
</div>
</xsl:if>
</xsl:template>
<xsl:template match="check">
<xsl:for-each select="./@*" >
<tr>
<td colspan="2" class="section-data">
<xsl:value-of select="name()"/>
</td>
<td colspan="2" class="section-data">
<xsl:value-of select="."/>
</td>
</tr>
</xsl:for-each>
<xsl:apply-templates select="./summary"/>
</xsl:template>
<!-- Reports rules relating specifically to namespaces -->
<xsl:template match="summary">
<tr>
<td><b><xsl:text>Results</xsl:text></b></td>
</tr>
<xsl:for-each select="./@*" >
<tr>
<td colspan="2" class="section-data">
<xsl:value-of select="name()"/>
</td>
<td colspan="2" class="section-data">
<xsl:value-of select="."/>
</td>
</tr>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,282 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright (c) 2007, the Eden Ridgway
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<xsl:stylesheet version="1.0" xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:output method="html" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:apply-templates select="//statistics" />
</xsl:template>
<xsl:template match="//statistics">
<xsl:comment>CruiseControl Summary Graphs - Written by Eden Ridgway</xsl:comment>
<style type="text/css">
body
{
font-family: Verdana;
}
.Legend
{
border: 1px solid silver;
margin: 10px 0px 10px 0px;
width: 200px;
position: relative;
left: 195px;
}
.Legend td
{
font-size: 10px;
}
.Legend .ColorBox
{
width: 10px;
height: 10px;
border: 1px solid black;
}
.ScrollContainer
{
height: 500px;
width: 95%;
overflow: auto;
border: 1px solid #666;
}
.ScrollContainer table
{
width: 100%;
border-bottom: 1px solid #7DAAEA;
}
.ScrollContainer a
{
text-decoration: none;
}
.ScrollContainer thead
{
font-weight: bold;
background-color: #3d80df;
color: white;
}
/* Detail table inside of summary table */
.ScrollContainer .DetailSubTable thead
{
font-weight: bold;
background-color: #d6e2f4;
color: black;
}
.ScrollContainer .DetailSubTable
{
border-top: 1px solid black;
border-bottom: 1px solid black;
}
.ScrollContainer td
{
font-family: Verdana;
font-size: 10px;
text-align: center;
border-left: 1px solid #346DBE;
border-right: 1px solid #7DAAEA;
}
.ScrollContainer .AlternateRow
{
background-color: #eee;
}
.GraphContainer
{
padding: 10px;
background-Color: #F0F0FF;
border: 1px solid black;
margin: 4px;
font-family: Verdana;
width: 600px;
height: 250px;
}
#MainTabContainer
{
font-family: Verdana;
font-size: 12px;
width: 100%;
height: 600px;
}
/* Graph/Table Headers */
#MainTabContainer h2
{
font-size: 16px;
}
div.TabContentsScrollContainer
{
overflow: auto;
height: 560px;
width: 100%;
position: relative;
font-family: Verdana;
font-size: 12px;
}
/* Pads the inside of each tab */
.dojoTabPaneWrapper
{
padding : 10px 10px 10px 10px;
}
tr.Success
{
color: black;
}
tr.Failure
{
color: red;
}
tr.Exception
{
color: #B88A00;
}
td.DrillDown a
{
width: 10px;
height: 10px;
}
tr.HideDetails
{
display: none;
}
</style>
<xsl:comment><![CDATA[[if IE]>
<style type="text/css">
.GraphContainer
{
width: 620px;
height: 270px;
}
</style>
<![endif]]]></xsl:comment>
<script type="text/javascript" src="../../../../javascript/Dojo/dojo.js"></script>
<script type="text/javascript" src="../../../../javascript/QueryFunctions.js"></script>
<script type="text/javascript" src="../../../../javascript/StatisticsTables.js"></script>
<script type="text/javascript" src="../../../../javascript/GraphWrapper.js"></script>
<script type="text/javascript">
dojo.require("dojo.widget.TabContainer");
dojo.require("dojo.widget.LinkPane");
dojo.require("dojo.widget.ContentPane");
dojo.require("dojo.widget.LayoutContainer");
</script>
<script type="text/javascript">
//Convert the statistics data into JavaScript objects
var _statistics =
[<xsl:apply-templates select="integration" />
];
</script>
<script type="text/javascript" src="../../../../javascript/StatisticsGraphs.js"></script>
<script type="text/javascript" src="../../../../javascript/GraphConfiguration.js"></script>
<!-- The tab container -->
<div id="MainTabContainer" dojoType="TabContainer" selectedTab="RecentBuildsTabWidget" >
<div id="RecentBuildsTab" widgetId="RecentBuildsTabWidget" dojoType="ContentPane" label="Recent Build Graphs" >
<div class="TabContentsScrollContainer">
<div id="RecentBuildsContainerArea"></div>
</div>
</div>
<div id="HistoricalBuildsTab" widgetId="HistoricalTabWidget" dojoType="ContentPane" label="Historic Build Graphs">
<div class="TabContentsScrollContainer">
<div id="HistoricGraphContainerArea"></div>
</div>
</div>
<div id="DetailedTabularDataTab" widgetId="DetailedDataTabWidget" dojoType="ContentPane" label="Detailed Data">
<div class="TabContentsScrollContainer">
<div id="DetailedTableStatisticsContainerArea"></div>
</div>
</div>
<div id="SummarisedTabularDataTab" widgetId="SummarisedDataTabWidget" dojoType="ContentPane" label="Summarised Data">
<div class="TabContentsScrollContainer">
<div id="SummaryTableStatisticsContainerArea"></div>
</div>
</div>
</div>
</xsl:template>
<!-- Replace one string with another -->
<xsl:template name="replace-string">
<xsl:param name="text"/>
<xsl:param name="replace"/>
<xsl:param name="with"/>
<xsl:choose>
<xsl:when test="contains($text,$replace)">
<xsl:value-of select="substring-before($text,$replace)"/>
<xsl:value-of select="$with"/>
<xsl:call-template name="replace-string">
<xsl:with-param name="text" select="substring-after($text,$replace)"/>
<xsl:with-param name="replace" select="$replace"/>
<xsl:with-param name="with" select="$with"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Ensures that there are no characters in the text that will cause JavaScript problems (like \u) -->
<xsl:template match="text()">
<xsl:call-template name="replace-string">
<xsl:with-param name="text" select='normalize-space(translate(., "&apos;", "`"))'/>
<xsl:with-param name="replace" select="'\'"/>
<xsl:with-param name="with" select="'\\'"/>
</xsl:call-template>
</xsl:template>
<!-- Create JSON statistic representation for each build -->
<xsl:template match="statistics/integration" xml:space="preserve">
{'BuildLabel' : '<xsl:apply-templates select="@build-label" />', 'Status' : '<xsl:value-of select="@status"/>', <xsl:for-each select="statistic[@name != '']">'<xsl:apply-templates select="@name" />' : '<xsl:apply-templates select="." />', </xsl:for-each> 'Date': '<xsl:value-of select="@day"/> <xsl:value-of select="@month"/> <xsl:value-of select="@year"/>'}<xsl:if test="position() != count(//integration)">,</xsl:if></xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<div name="StyleCopViolations">
<style type="text/css">
div[name=StyleCopViolations] div[name=header]{ font-weight: bold; padding: 10px 0 10px 0;}
li { line-height: 1.5em; padding-bottom: 5px;}
li span[name=info] {color: #AA0000; font-weight: bold;}
*[name=missingInfo] { font-weight: bold;}
div[name=StyleCopViolations] .sectionheader { padding: 2px;}
</style>
<!-- Use a table and not a div, as (at least) Outlook does not render the width correctly -->
<table class="sectionheader" width="98%"><tr><td>StyleCop Report</td></tr></table>
<xsl:choose>
<xsl:when test="count(//StyleCopViolations) = 0">
<div name="header">No StyleCop information in build logs.</div>
</xsl:when>
</xsl:choose>
<xsl:apply-templates select="//StyleCopViolations"/>
</div>
</xsl:template>
<xsl:template match="//StyleCopViolations">
<div name="header">
<xsl:choose>
<xsl:when test="count(./Violation) > 0">
<xsl:attribute name="class">error</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="class">success</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<span name="label">Number of Violations: </span><xsl:value-of select="count(./Violation)" />
</div>
<ol name="errorList">
<xsl:for-each select="Violation">
<xsl:sort select="@Source" />
<xsl:sort select="@LineNumber" />
<li>
<span name="info"><xsl:value-of select="concat(@Source, ':', @LineNumber, ' (', @RuleId, ' - ', @Rule, ')')" /></span><br/>
<span name="errorDetails"><xsl:value-of select="." /></span>
</li>
</xsl:for-each>
</ol>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:if test="count(//StyleCopViolations) &gt; 0">
<div name="StyleCopViolations">
<style type="text/css">
div[name=StyleCopViolations] div[name=header]{ font-weight: bold; padding: 10px 0 10px 0;}
li { line-height: 1.5em; padding-bottom: 5px;}
li span[name=info] {color: #AA0000; font-weight: bold;}
*[name=missingInfo] { font-weight: bold;}
div[name=StyleCopViolations] .sectionheader { padding: 2px;}
</style>
<!-- Use a table and not a div, as (at least) Outlook does not render the width correctly -->
<table class="sectionheader" width="98%">
<tr>
<td>StyleCop Report</td>
</tr>
</table>
<xsl:apply-templates select="//StyleCopViolations"/>
</div>
</xsl:if>
</xsl:template>
<xsl:template match="//StyleCopViolations">
<xsl:if test="count(./Violation) &gt; 0">
<div name="header">
<span name="label">Number of Violations: </span>
<xsl:value-of select="count(./Violation)" />
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
+259
View File
@@ -0,0 +1,259 @@
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:variable name="nunit2.result.list" select="//test-results"/>
<xsl:variable name="nunit2.suite.list" select="$nunit2.result.list//test-suite"/>
<xsl:variable name="nunit2.suite.count" select="count($nunit2.result.list//test-suite)"/>
<xsl:variable name="nunit2.case.list" select="$nunit2.suite.list/results/test-case"/>
<xsl:variable name="nunit2.case.count" select="count($nunit2.case.list)"/>
<xsl:variable name="nunit2.time" select="sum($nunit2.result.list/test-suite[position()=1]/@time)"/>
<xsl:variable name="nunit2.failure.list" select="$nunit2.case.list/failure"/>
<xsl:variable name="nunit2.failure.count" select="count($nunit2.failure.list)"/>
<xsl:variable name="nunit2.success.list" select="$nunit2.case.list[@success='True']"/>
<xsl:variable name="nunit2.success.count" select="count($nunit2.success.list)"/>
<xsl:variable name="nunit2.notrun.list" select="$nunit2.case.list/reason"/>
<xsl:variable name="nunit2.notrun.count" select="count($nunit2.notrun.list)"/>
<xsl:variable name="junit.suite.list" select="//testsuite"/>
<xsl:variable name="junit.suite.count" select="count($junit.suite.list)"/>
<xsl:variable name="junit.suite.error.list" select="$junit.suite.list/error"/>
<xsl:variable name="junit.suite.error.count" select="count($junit.suite.error.list)"/>
<xsl:variable name="junit.case.list" select="$junit.suite.list/testcase"/>
<xsl:variable name="junit.case.count" select="count($junit.case.list)"/>
<xsl:variable name="junit.time" select="sum($junit.case.list/@time)"/>
<xsl:variable name="junit.failure.list" select="$junit.case.list/failure"/>
<xsl:variable name="junit.failure.count" select="count($junit.failure.list)"/>
<xsl:variable name="junit.success.list" select="$junit.case.list[@success='True']"/>
<xsl:variable name="junit.success.count" select="count($junit.success.list)"/>
<xsl:variable name="junit.error.list" select="$junit.case.list/error"/>
<xsl:variable name="junit.error.count" select="count($junit.error.list)"/>
<xsl:variable name="total.time" select="$nunit2.time + $junit.time"/>
<xsl:variable name="total.notrun.count" select="$nunit2.notrun.count"/>
<xsl:variable name="total.suite.count" select="$nunit2.suite.count + $junit.suite.count"/>
<xsl:variable name="total.run.count" select="$nunit2.case.count + $junit.case.count - $total.notrun.count"/>
<xsl:variable name="total.failure.count" select="$nunit2.failure.count + $junit.failure.count + $junit.error.count + $junit.suite.error.count"/>
<xsl:template match="/">
<head>
<style>
body, tr { color: #000000; background-color: white; font-family: Verdana; font-size: 10pt; }
.header-title { font-size:12px; color:#000; font-weight:bold; padding-bottom:10pt; }
.header-label { font-weight:bold; }
.header-data { color:#000; }
.header-data-error { color:#000; white-space:pre; }
.section-table { margin-top:10px; }
.sectionheader { background-color:#006; color:#FFF; }
.section-data { font-size:9px; color:#000; }
.section-oddrow { background-color:#F0F7FF; }
.section-evenrow { background-color:#FFF; }
.section-error { font-size:9px; color:#F30; white-space:pre; }
.warning { color: darkorange; }
.error { color:red }
</style>
</head>
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<!-- Unit Tests -->
<tr>
<td class="sectionheader" colspan="2">
Suites run: <xsl:value-of select="$total.suite.count"/>,
Tests run: <xsl:value-of select="$total.run.count"/>,
Failures: <xsl:value-of select="$total.failure.count"/>,
Not run: <xsl:value-of select="$total.notrun.count"/>,
Time: <xsl:value-of select="$total.time"/> seconds
</td>
</tr>
<xsl:choose>
<xsl:when test="$total.run.count = 0">
<tr><td colspan="2" class="section-data">No Tests Run</td></tr>
<tr><td colspan="2" class="section-error">This project doesn't have any tests</td></tr>
</xsl:when>
<xsl:when test="$total.failure.count = 0">
<tr><td colspan="2" class="section-data">All Tests Passed</td></tr>
</xsl:when>
</xsl:choose>
<xsl:apply-templates select="$junit.success.list | $nunit2.success.list"/>
<xsl:apply-templates select="$junit.suite.error.list"/>
<xsl:apply-templates select="$junit.error.list"/>
<xsl:apply-templates select="$junit.failure.list | $nunit2.failure.list"/>
<xsl:apply-templates select="$nunit2.notrun.list"/>
<tr><td colspan="2"> </td></tr>
<xsl:if test="$total.failure.count > 0">
<tr>
<td class="sectionheader" colspan="2">
Unit Test Failure and Error Details (<xsl:value-of select="$total.failure.count"/>)
</td>
</tr>
<xsl:call-template name="junittestdetail">
<xsl:with-param name="detailnodes" select="//testsuite/testcase[.//error]"/>
</xsl:call-template>
<xsl:call-template name="junittestdetail">
<xsl:with-param name="detailnodes" select="//testsuite/testcase[.//failure]"/>
</xsl:call-template>
<xsl:call-template name="nunit2testdetail">
<xsl:with-param name="detailnodes" select="//test-suite/results/test-case[.//failure]"/>
</xsl:call-template>
<tr><td colspan="2"> </td></tr>
</xsl:if>
<xsl:if test="$nunit2.notrun.count > 0">
<tr>
<td class="sectionheader" colspan="2">
Warning Details (<xsl:value-of select="$nunit2.notrun.count"/>)
</td>
</tr>
<xsl:call-template name="nunit2testdetail">
<xsl:with-param name="detailnodes" select="//test-suite/results/test-case[.//reason]"/>
</xsl:call-template>
<tr><td colspan="2"> </td></tr>
</xsl:if>
</table>
</xsl:template>
<!-- Unit Test Errors -->
<xsl:template match="error">
<tr>
<xsl:if test="position() mod 2 = 0">
<xsl:attribute name="class">section-oddrow</xsl:attribute>
</xsl:if>
<td class="section-data">Error</td>
<td class="section-data"><xsl:value-of select="../@name"/></td>
</tr>
</xsl:template>
<!-- Unit Test Failures -->
<xsl:template match="failure">
<tr>
<xsl:if test="($junit.error.count + position()) mod 2 = 0">
<xsl:attribute name="class">section-oddrow</xsl:attribute>
</xsl:if>
<td class="section-data">Failure</td>
<td class="section-data"><xsl:value-of select="../@name"/></td>
</tr>
</xsl:template>
<!-- Unit Test Successes -->
<xsl:template match="test-case[@success='True'] | testcase[@success='True']">
<tr>
<xsl:if test="($junit.error.count + position()) mod 2 = 0">
<xsl:attribute name="class">section-oddrow</xsl:attribute>
</xsl:if>
<td class="section-data">Success</td>
<td class="section-data">
<xsl:value-of select="@name"/>
</td>
</tr>
</xsl:template>
<!-- Unit Test Warnings -->
<xsl:template match="reason">
<tr>
<xsl:if test="($total.failure.count + position()) mod 2 = 0">
<xsl:attribute name="class">section-oddrow</xsl:attribute>
</xsl:if>
<td class="section-data">Warning</td>
<td class="section-data"><xsl:value-of select="../@name"/></td>
</tr>
</xsl:template>
<!-- JUnit Test Errors And Failures Detail Template -->
<xsl:template name="junittestdetail">
<xsl:param name="detailnodes"/>
<xsl:for-each select="$detailnodes">
<tr><td class="section-data">Test:</td><td class="section-data"><xsl:value-of select="@name"/></td></tr>
<xsl:if test="error">
<tr><td class="section-data">Type:</td><td class="section-data">Error</td></tr>
<tr><td class="section-data">Message:</td><td class="section-data"><xsl:value-of select="error/@message"/></td></tr>
<tr>
<td></td>
<td class="section-error">
<pre><xsl:call-template name="br-replace">
<xsl:with-param name="word" select="error"/>
</xsl:call-template></pre>
</td>
</tr>
</xsl:if>
<xsl:if test="failure">
<tr><td class="section-data">Type:</td><td class="section-data">Failure</td></tr>
<tr><td class="section-data">Message:</td><td class="section-data"><xsl:value-of select="failure/@message"/></td></tr>
<tr>
<td></td>
<td class="section-error">
<pre><xsl:call-template name="br-replace">
<xsl:with-param name="word" select="failure"/>
</xsl:call-template></pre>
</td>
</tr>
</xsl:if>
<tr><td colspan="2"><hr size="1" width="100%" color="#888888"/></td></tr>
</xsl:for-each>
</xsl:template>
<!-- NUnit Test Failures And Warnings Detail Template -->
<xsl:template name="nunit2testdetail">
<xsl:param name="detailnodes"/>
<xsl:for-each select="$detailnodes">
<xsl:if test="failure">
<tr><td class="section-data">Test:</td><td class="section-data"><xsl:value-of select="@name"/></td></tr>
<tr><td class="section-data">Type:</td><td class="section-data">Failure</td></tr>
<tr><td class="section-data">Message:</td><td class="section-data"><xsl:value-of select="failure//message"/></td></tr>
<tr>
<td></td>
<td class="section-error">
<pre><xsl:value-of select="failure//stack-trace"/></pre>
</td>
</tr>
</xsl:if>
<xsl:if test="reason">
<tr><td class="section-data">Test:</td><td class="section-data"><xsl:value-of select="@name"/></td></tr>
<tr><td class="section-data">Type:</td><td class="section-data">Warning</td></tr>
<tr><td class="section-data">Message:</td><td class="section-data"><xsl:value-of select="reason//message"/></td></tr>
</xsl:if>
<tr><td colspan="2"><hr size="1" width="100%" color="#888888"/></td></tr>
</xsl:for-each>
</xsl:template>
<xsl:template name="br-replace">
<xsl:param name="word"/>
<xsl:variable name="cr"><xsl:text>
<!-- </xsl:text> on next line on purpose to get newline -->
</xsl:text></xsl:variable>
<xsl:choose>
<xsl:when test="contains($word,$cr)">
<xsl:value-of select="substring-before($word,$cr)"/>
<br/>
<xsl:call-template name="br-replace">
<xsl:with-param name="word" select="substring-after($word,$cr)"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$word"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
+210
View File
@@ -0,0 +1,210 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="yes" encoding="US-ASCII"/>
<!--
Copyright 2000-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
The purpose have this XSL is to provide a nice way to look at the output
from the Ant XmlLogger (ie: ant -listener org.apache.tools.ant.XmlLogger )
@author <a href="mailto:sbailliez@apache.org">Stephane Bailliez</a>
-->
<xsl:decimal-format decimal-separator="." grouping-separator="," />
<xsl:template match="/">
<html>
<head>
<style type="text/css">
.bannercell {
border: 0px;
padding: 0px;
}
body {
margin: 0;
font:normal 100% arial,helvetica,sanserif;
background-color:#FFFFFF;
color:#000000;
}
table.status {
font:bold 80% arial,helvetica,sanserif;
background-color:#525D76;
color:#ffffff;
}
table.log tr td, tr th {
font-size: 80%;
}
.error {
color:red;
}
.warn {
color:brown;
}
.info {
color:gray;
}
.debug{
color:gray;
}
.failed {
font-size:80%;
background-color: red;
color:#FFFFFF;
font-weight: bold
}
.complete {
font-size:80%;
background-color: #525D76;
color:#FFFFFF;
font-weight: bold
}
.a td {
background: #efefef;
}
.b td {
background: #fff;
}
th, td {
text-align: left;
vertical-align: top;
}
th {
background: #ccc;
color: black;
}
table, th, td {
border: none
}
h3 {
font:bold 80% arial,helvetica,sanserif;
background: #525D76;
color: white;
text-decoration: none;
padding: 5px;
margin-right: 2px;
margin-left: 2px;
margin-bottom: 0;
}
</style>
</head>
<body>
<!-- jakarta logo -->
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top" class="bannercell">
<a href="http://jakarta.apache.org/">
<img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
</a>
</td>
<td style="text-align:right;vertical-align:bottom">
<a href="http://jakarta.apache.org/ant">Apache Ant</a>
</td>
</tr>
</table>
<table border="0" width="100%">
<tr><td><hr noshade="yes" size="1"/></td></tr>
</table>
<xsl:apply-templates select="cruisecontrol/build/build"/>
<!-- FOOTER -->
<table width="100%">
<tr><td><hr noshade="yes" size="1"/></td></tr>
<tr><td>
<div align="center"><font color="#525D76" size="-1"><em>
Copyright &#169; 2000-2002, Apache Software Foundation
</em></font></div>
</td></tr>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="build">
<!-- build status -->
<table width="100%">
<xsl:attribute name="class">
<xsl:if test="@error">failed</xsl:if>
<xsl:if test="not(@error)">complete</xsl:if>
</xsl:attribute>
<tr>
<xsl:if test="@error">
<td nowrap="yes">Build Failed</td>
</xsl:if>
<xsl:if test="not(@error)">
<td nowrap="yes">Build Complete</td>
</xsl:if>
<td style="text-align:right" nowrap="yes">Total Time: <xsl:value-of select="@time"/></td>
</tr>
<tr>
<td colspan="2">
<xsl:if test="@error">
<tt><xsl:value-of select="@error"/></tt><br/>
<i style="font-size:80%">See the <a href="#stacktrace" alt="Click for details">stacktrace</a>.</i>
</xsl:if>
</td>
</tr>
</table>
<table border="1" cellspacing="2" cellpadding="3" width="100%" style="font-size:80%">
<tr class="a"><td width="1">ant.file</td><td><xsl:value-of select="substring-after(//message[contains(text(),'ant.file')], '->')"/></td></tr>
<tr class="b"><td width="1">ant.version</td><td><xsl:value-of select="substring-after(//message[contains(text(),'ant.version')], '->')"/></td></tr>
<tr class="a"><td width="1">java.version</td><td><xsl:value-of select="substring-after(//message[contains(text(),'java.vm.version')], '->')"/></td></tr>
<tr class="b"><td width="1">os.name</td><td><xsl:value-of select="substring-after(//message[contains(text(),'os.name')], '->')"/></td></tr>
</table>
<!-- build information -->
<h3>Build events</h3>
<table class="log" border="1" cellspacing="2" cellpadding="3" width="100%">
<tr>
<th nowrap="yes" align="left" width="1%">target</th>
<th nowrap="yes" align="left" width="1%">task</th>
<th nowrap="yes" align="left">message</th>
</tr>
<xsl:apply-templates select=".//message[@priority != 'debug']"/>
</table>
<p>
<!-- stacktrace -->
<xsl:if test="stacktrace">
<a name="stacktrace"/>
<h3>Error details</h3>
<table width="100%">
<tr><td>
<pre><xsl:value-of select="stacktrace"/></pre>
</td></tr>
</table>
</xsl:if>
</p>
</xsl:template>
<!-- report every message but those with debug priority -->
<xsl:template match="message[@priority!='debug']">
<tr valign="top">
<!-- alternated row style -->
<xsl:attribute name="class">
<xsl:if test="position() mod 2 = 1">a</xsl:if>
<xsl:if test="position() mod 2 = 0">b</xsl:if>
</xsl:attribute>
<td nowrap="yes" width="1%"><xsl:value-of select="../../@name"/></td>
<td nowrap="yes" style="text-align:right" width="1%">[ <xsl:value-of select="../@name"/> ]</td>
<td class="{@priority}" nowrap="yes">
<xsl:value-of select="text()"/>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,57 @@
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:variable name="errors" select="/cruisecontrol//msbuild//error" />
<xsl:variable name="errors.count" select="count($errors)" />
<xsl:variable name="warnings" select="/cruisecontrol//msbuild//warning" />
<xsl:variable name="warnings.count" select="count($warnings)" />
<xsl:if test="$errors.count > 0">
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<tr>
<td class="sectionheader">
Errors (<xsl:value-of select="$errors.count"/>)
</td>
</tr>
<tr>
<td class="section-error">
<xsl:apply-templates select="$errors"/>
</td>
</tr>
</table>
</xsl:if>
<xsl:if test="$warnings.count > 0">
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<tr>
<td class="sectionheader">
Warnings (<xsl:value-of select="$warnings.count"/>)
</td>
</tr>
<tr>
<td class="section-warn">
<xsl:apply-templates select="$warnings"/>
</td>
</tr>
</table>
</xsl:if>
</xsl:template>
<xsl:template match="error">
<div style="color:orangered">
<xsl:if test="@file != ''" >
<xsl:value-of select="@file"/> (<xsl:value-of select="@line"/>,<xsl:value-of select="@column"/>):
</xsl:if>
error<xsl:value-of select="@code"/>: <xsl:value-of select="text()" />
</div>
</xsl:template>
<xsl:template match="warning">
<div style="color:blue">
<xsl:if test="@file != ''" >
<xsl:value-of select="@file"/> (<xsl:value-of select="@line"/>,<xsl:value-of select="@column"/>):
</xsl:if>
warning <xsl:value-of select="@code"/>: <xsl:value-of select="text()" />
</div>
</xsl:template>
</xsl:stylesheet>
+35
View File
@@ -0,0 +1,35 @@
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:variable name="messages" select="/cruisecontrol//buildresults//message" />
<xsl:if test="count($messages) > 0">
<xsl:variable name="error.messages" select="$messages[(contains(text(), 'error ') and not(contains(text(), 'warning ') )) or @level='Error'] | /cruisecontrol//builderror/message | /cruisecontrol//internalerror/message" />
<xsl:variable name="error.messages.count" select="count($error.messages)" />
<xsl:variable name="warning.messages" select="$messages[(contains(text(), 'warning ')) or @level='Warning']" />
<xsl:variable name="warning.messages.count" select="count($warning.messages)" />
<xsl:variable name="total" select="count($error.messages) + count($warning.messages)"/>
<xsl:if test="$error.messages.count > 0">
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<tr><td class="sectionheader">Errors: (<xsl:value-of select="$error.messages.count"/>)</td></tr>
<xsl:apply-templates select="$error.messages"/>
</table>
</xsl:if>
<xsl:if test="$warning.messages.count > 0">
<table class="section-table" cellpadding="2" cellspacing="0" border="1" width="98%">
<tr><td class="sectionheader">Warnings: (<xsl:value-of select="$warning.messages.count"/>)</td></tr>
<xsl:apply-templates select="$warning.messages"/>
</table>
</xsl:if>
</xsl:if>
</xsl:template>
<xsl:template match="message">
<tr class="error"><td><xsl:value-of select="substring(text(),1,1024)"/></td></tr>
</xsl:template>
</xsl:stylesheet>
+23
View File
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="message" >
<span>
<xsl:if test="@level = 'Error'">
<xsl:attribute name="style">color:red;</xsl:attribute>
</xsl:if>
<xsl:value-of select="text()" /></span><br />
</xsl:template>
<xsl:template match="/">
<h1>Console Log</h1>
<p style="font-family: consolas, monospace;font-size: 10pt;">
<pre>
<xsl:apply-templates select="/cruisecontrol/build/buildresults/message" />
</pre>
</p>
</xsl:template>
</xsl:stylesheet>
+32
View File
@@ -0,0 +1,32 @@
body, table, form, input, td, th, p, textarea, select
{
font-family: verdana, helvetica, arial;
font-size: 11px;
}
a:hover { color:#FC0; }
.main-panel { color:#FC0; }
.link { color:#FFF; text-decoration:none; }
.link-failed { color:#F30; text-decoration:none; }
.buildresults-header { color: #FFF; font-weight: bold; }
.buildresults-data { color: #9F3; }
.buildresults-data-failed { color: #F30; }
.stylesection { margin-left: 4px; }
.header-title { font-size:12px; color:#000; font-weight:bold; padding-bottom:10pt; }
.header-label { font-weight:bold; }
.header-data { color:#000; }
.header-data-error { color:#000; white-space:pre; }
.section-table { margin-top:10px; }
.sectionheader { background-color:#006; color:#FFF; }
.section-data { font-size:9px; color:#000; }
.section-oddrow { background-color:#F0F7FF; }
.section-evenrow { background-color:#FFF; }
.section-error { font-size:9px; color:#F30; white-space:pre; }
.warning { color: darkorange; }
.error { color:red }
.pluginLinks { float:right; margin-top:10px; padding:10px; background-color:#000066; color:White }
@@ -0,0 +1,31 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:variable name="reports" select="//DuplicateReport" />
<xsl:choose>
<xsl:when test="count($reports) > 0">
<h2>Duplicate Finder Analysis</h2>
<xsl:apply-templates select="$reports" />
</xsl:when>
<xsl:otherwise>
<h2>Log does not contain any XML output from DupFinder.</h2>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="DuplicateReport">
<div>
<xsl:for-each select="Message">
<div>
<xsl:value-of select="."/>
</div>
</xsl:for-each>
<div>
<xsl:value-of select="@FileCount"/> files processed
-
<xsl:value-of select="@DuplicateCount"/> duplicates found
</div>
</div>
</xsl:template>
</xsl:stylesheet>
+55
View File
@@ -0,0 +1,55 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:variable name="reports" select="//DuplicateReport" />
<xsl:choose>
<xsl:when test="count($reports) > 0">
<h2>Duplicate Finder Analysis</h2>
<hr/>
<xsl:apply-templates select="$reports" />
</xsl:when>
<xsl:otherwise>
<h2>Log does not contain any XML output from DupFinder.</h2>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="DuplicateReport">
<div>
<xsl:for-each select="Message">
<div>
<xsl:value-of select="."/>
</div>
</xsl:for-each>
<div>
<xsl:value-of select="@FileCount"/> files processed
-
<xsl:value-of select="@DuplicateCount"/> duplicates found
</div>
<hr/>
<xsl:for-each select="Duplicates">
<div>
Duplicate of length <xsl:value-of select="@Length"/> at:
</div>
<ul>
<xsl:for-each select="Duplicate">
<li>
Line starting <xsl:value-of select="@LineNumber"/> in <xsl:value-of select="@FileName"/>
</li>
</xsl:for-each>
</ul>
<xsl:if test="code/line">
<div style="background-color:#aaaaaa;">
<xsl:for-each select="code/line">
<div style="white-space:pre;">
<xsl:value-of select="."/>
</div>
</xsl:for-each>
</div>
</xsl:if>
<hr/>
</xsl:for-each>
</div>
</xsl:template>
</xsl:stylesheet>
+68
View File
@@ -0,0 +1,68 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/xhtml1/strict">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:apply-templates select="//report/data/all[./coverage/@value != '']" />
</xsl:template>
<xsl:template match="all">
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<tr>
<td class="unittests-sectionheader" colspan="2">
<!-- Test Coverage Summary -->
EMMA - Test Coverage:
<xsl:value-of select="substring-before(./coverage/@value, '%')"/>%
</td>
</tr>
<tr>
<td>
<div style="color: maroon; font-size: 10pt; font-weight: bold;">
Package breakdown:
</div>
</td>
</tr>
<tr>
<td>
<br />
<table border="1" cellpadding="3" cellspacing="0" bordercolor="black" width="100%">
<tr>
<td>Line Coverage %</td>
<td>Package</td>
</tr>
<xsl:apply-templates select="package/coverage[@type = 'line, %']">
<xsl:sort data-type="number" select="number(substring-before(@value, '%'))"/>
</xsl:apply-templates>
</table>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="coverage">
<tr>
<xsl:choose>
<xsl:when test="substring-before(@value, '%') &lt; 80">
<td bgcolor="#FFCCCC" width="20%">
<xsl:value-of select="substring-before(@value, '%')"/>
</td>
</xsl:when>
<xsl:otherwise>
<td bgcolor="#ccffcc" width="20%">
<xsl:value-of select="substring-before(@value, '%')"/>
</td>
</xsl:otherwise>
</xsl:choose>
<td bgcolor="#FFFFEE">
<xsl:value-of select="../@name"/>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
+26
View File
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:variable name="hrefnode" select="/cruisecontrol/build/buildresults//task[@name='fit']/message[starts-with(text(), 'results')]"/>
<xsl:variable name="resultsnode" select="/cruisecontrol/build/buildresults//task[@name='fit']/message[contains(text(), 'fixtures run')]"/>
<xsl:variable name="ahref" select="substring-after($hrefnode, ':')"/>
<xsl:template match="/">
<xsl:if test="count($hrefnode) > 0">
<table cellpadding="2" cellspacing="0" border="0" width="98%">
<tr>
<td class="sectionheader" colspan="2">
Acceptance Tests: <xsl:value-of select="$resultsnode"/>
</td>
</tr>
<tr>
<td><a href="{$ahref}">test results</a></td>
</tr>
</table>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
+129
View File
@@ -0,0 +1,129 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:variable name="fit.result.list" select="//testResults/result"/>
<xsl:variable name="fit.wrongpagecount" select="count($fit.result.list/counts/wrong[text() > 0])" />
<xsl:variable name="fit.ignorespagecount" select="count($fit.result.list/counts/ignores[text() > 0])" />
<xsl:variable name="fit.exceptionspagecount" select="count($fit.result.list/counts/exceptions[text() > 0])" />
<xsl:variable name="fit.correctpagecount" select="count($fit.result.list/counts[wrong/text() = 0 and exceptions/text() = 0 and ignores/text() = 0])" />
<xsl:variable name="fit.correctcount" select="//testResults/finalCounts/right"/>
<xsl:variable name="fit.failures" select="//testResults/finalCounts/wrong"/>
<xsl:variable name="fit.notrun" select="//testResults/finalCounts/ignores"/>
<xsl:variable name="fit.exceptions" select="//testResults/finalCounts/exceptions"/>
<xsl:variable name="fit.case.list" select="$fit.result.list//test-case"/>
<xsl:variable name="fit.suite.list" select="$fit.result.list//test-suite"/>
<xsl:variable name="fit.failure.list" select="$fit.case.list//failure"/>
<xsl:variable name="fit.notrun.list" select="$fit.case.list//reason"/>
<xsl:variable name="colorClass">
<xsl:choose>
<xsl:when test="$fit.exceptionspagecount > 0">fiterror</xsl:when>
<xsl:when test="$fit.ignorespagecount > 0">fitignore</xsl:when>
<xsl:when test="$fit.wrongpagecount > 0" >fail</xsl:when>
<xsl:otherwise>pass</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="fit.tests.present" select="count(//testResults/result) > 0 or count(/cruisecontrol/build/buildresults//testsuite) > 0" />
<xsl:template match="/">
<xsl:choose>
<xsl:when test="$fit.tests.present">
<style>
*.pass{
background-color: #AAFFAA;
}
*.fail{
background-color: #FFAAAA;
}
*.fit_label{
color: #AAAAAA;
}
*.fiterror{
background-color: #FFFFAA;
}
*.fitignore{
background-color: #CCCCCC;
}
*.fitheader{
border: solid 1px black;
margin: 1px;
padding: 2px;
}
*.line{
margin: 5px;
}
</style>
<script>
function toggleDiv( imgId, divId )
{
eDiv = document.getElementById( divId );
eImg = document.getElementById( imgId );
if ( eDiv.style.display == "none" )
{
eDiv.style.display = "block";
eImg.src = "images/arrow_minus_small.gif";
}
else
{
eDiv.style.display = "none";
eImg.src = "images/arrow_plus_small.gif";
}
}
function exportDivToNewWindow( divId )
{
eDiv = document.getElementById( divId );
newWin = window.open("", "_new");
newWin.document.write("&lt;link href='fitnesse.css' type='text/css' rel='stylesheet'&gt;");
newWin.document.write(eDiv.innerHTML);
newWin.document.close();
}
</script>
<div>
<div class="{$colorClass} fitheader">
<strong>FitNesse Summary -- Test Pages:</strong>
<xsl:value-of select="$fit.correctpagecount"/> right, <xsl:value-of select="$fit.wrongpagecount"/> wrong,
<xsl:value-of select="$fit.ignorespagecount"/> ignored, <xsl:value-of select="$fit.exceptionspagecount"/> exceptions
<strong>Assertions:</strong>
<xsl:value-of select="$fit.correctcount"/> right,
<xsl:value-of select="$fit.failures"/> wrong,
<xsl:value-of select="$fit.notrun"/> ignored,
<xsl:value-of select="$fit.exceptions"/> exceptions
</div>
<xsl:for-each select="$fit.result.list">
<xsl:variable name="test.id" select="generate-id()" />
<xsl:variable name="test.name" select="relativePageName" />
<xsl:variable name="colorClass">
<xsl:choose>
<xsl:when test="counts/exceptions > 0">fiterror</xsl:when>
<xsl:when test="counts/ignores > 0">fitignore</xsl:when>
<xsl:when test="counts/wrong > 0" >fail</xsl:when>
<xsl:otherwise>pass</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<div class="line">
<span class="{$colorClass}" style="padding:2px;" >
<xsl:value-of select="counts/right"/> right, <xsl:value-of select="counts/wrong"/> wrong,
<xsl:value-of select="counts/ignores"/> ignored, <xsl:value-of select="counts/exceptions"/> exceptions
</span>
<input type="image" src="images/arrow_minus_small.gif">
<xsl:attribute name="id">img<xsl:value-of select="$test.id"/></xsl:attribute>
<xsl:attribute name="onclick">javascript:toggleDiv('img<xsl:value-of select="$test.id"/>', 'fitDetails<xsl:value-of select="$test.id"/>');</xsl:attribute>
</input>&#160;
<input type="button">
<xsl:attribute name="value">Export Details</xsl:attribute>
<xsl:attribute name="onclick">javascript:exportDivToNewWindow('fitDetails<xsl:value-of select="$test.id"/>');</xsl:attribute>
</input>&#160;
<xsl:value-of select="$test.name"/>
</div>
<span style="display:none">
<xsl:attribute name="id">fitDetails<xsl:value-of select="$test.id"/></xsl:attribute>
<blockquote>
<xsl:value-of select="content" disable-output-escaping="yes"/>
</blockquote>
</span>
</xsl:for-each>
</div>
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,409 @@
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" />
<xsl:param name="applicationPath" select="'.'" />
<xsl:variable name="fxcop.root" select="//FxCopReport" />
<xsl:template match="/">
<div id="fxcop-report">
<script language="javascript">
function toggle (name, img)
{
var element = document.getElementById (name);
if (element.style.display == 'none')
element.style.display = '';
else
element.style.display = 'none';
var img_element = document.getElementById (img);
if (img_element.src.indexOf ('minus.png') > 0)
img_element.src = '<xsl:value-of select="$applicationPath" />/images/plus.png';
else
img_element.src = '<xsl:value-of select="$applicationPath" />/images/minus.png';
}
</script>
<style type="text/css">
#fxcop-report
{
font-family: Arial, Helvetica, sans-serif;
margin-left: 0;
margin-right: 0;
margin-top: 0;
}
#fxcop-report .header
{
background-color: #566077;
background-repeat: repeat-x;
color: #fff;
font-weight: bolder;
height: 50px;
vertical-align: middle;
}
#fxcop-report .headertext
{
height: 35px;
margin-left: 15px;
padding-top: 15px;
width: auto;
}
#fxcop-report .wrapper
{
padding-left: 20px;
padding-right: 20px;
width: auto;
}
#fxcop-report .legend
{
background-color: #ffc;
border: #d7ce28 1px solid;
font-size: small;
margin-top: 15px;
padding: 5px;
vertical-align: middle;
width: inherit;
}
#fxcop-report .clickablerow
{
cursor: pointer;
}
#fxcop-report .tabletotal
{
border-top: 1px #000;
font-weight: 700;
}
#fxcop-report .results-table
{
border-collapse: collapse;
font-size: 12px;
margin-top: 20px;
text-align: left;
width: 100%;
}
#fxcop-report .results-table th
{
background: #b9c9fe;
border-bottom: 1px solid #fff;
border-top: 4px solid #aabcfe;
color: #039;
font-size: 13px;
font-weight: 400;
padding: 8px;
}
#fxcop-report .results-table td
{
background: #e8edff;
border-bottom: 1px solid #fff;
border-top: 1px solid transparent;
color: #669;
padding: 5px;
}
#fxcop-report .errorlist td
{
background: #FFF;
border-bottom: 0;
border-top: 0 solid transparent;
color: #000;
padding: 0;
}
#fxcop-report .inner-results
{
border-collapse: collapse;
font-size: 12px;
margin-bottom: 3px;
margin-top: 4px;
text-align: left;
width: 100%;
}
#fxcop-report .inner-results td
{
background: #FFF;
border-bottom: 1px solid #fff;
border-top: 1px solid transparent;
color: #669;
padding: 3px;
}
#fxcop-report .inner-header th
{
background: #b9c9fe;
color: #039;
}
#fxcop-report .inner-rule-description
{
background-color: transparent;
border-collapse: collapse;
border: 0px;
font-size: 12px;
margin-bottom: 3px;
margin-top: 4px;
text-align: left;
width: 100%;
}
#fxcop-report .inner-rule-description tr
{
background-color: transparent;
border: 0px;
}
#fxcop-report .inner-rule-description td
{
background-color: transparent;
border: 0px;
}
</style>
<xsl:apply-templates select="$fxcop.root" />
</div>
</xsl:template>
<xsl:template match="FxCopReport">
<div class="header">
<div class="headertext">
FxCop <xsl:value-of select="@Version"/>: <xsl:value-of select="Localized/String[@Key='ReportTitle']/text()" />
</div>
</div>
<div class="wrapper">
<div class="legend">
<div>
Assemblies checked: <xsl:value-of select="count(Targets/Target/Modules/Module)" /><br />
Warnings: <xsl:value-of select="count(//Message/Issue[@Level='Warning'])" /><br />
Critical Warnings: <xsl:value-of select="count(//Message/Issue[@Level='CriticalWarning'])" /><br />
Errors: <xsl:value-of select="count(//Message/Issue[@Level='Error'])"/><br />
Critical Errors: <xsl:value-of select="count(//Message/Issue[@Level='CriticalError'])"/><br />
Total Messages: <xsl:value-of select="count(//Message)"/><br />
</div>
</div>
<table class='results-table'>
<thead>
<tr>
<th scope='col'></th>
<th scope='col'></th>
<th scope='col'>Assembly</th>
<th scope='col'>Types</th>
<th scope='col'>Warnings</th>
<th scope='col'>Errors</th>
<th scope='col'>Total Messages</th>
</tr>
</thead>
<tbody>
<xsl:for-each select="Targets/Target/Modules/Module">
<xsl:call-template name="print-module" />
</xsl:for-each>
</tbody>
</table>
</div>
</xsl:template>
<xsl:template name="print-module">
<xsl:variable name="module.id" select="generate-id()" />
<tr class="clickablerow" onclick="toggle('{$module.id}', 'img-{$module.id}')">
<td style="width: 10px">
<img id="img-{$module.id}" src="{$applicationPath}/images/plus.png" />
</td>
<td style="width: 16px">
<xsl:choose>
<xsl:when test="count(.//Message[Issue/@Level='Error' or Issue/@Level='CriticalError']) > 0">
<img src="{$applicationPath}/images/error.png" />
</xsl:when>
<xsl:when test="count(.//Message[Issue/@Level='Warning' or Issue/@Level='CriticalWarning']) > 0">
<img src="{$applicationPath}/images/warning.png" />
</xsl:when>
<xsl:otherwise>
<img src="{$applicationPath}/images/ok.png" />
</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:value-of select="@Name" />
</td>
<td>
<xsl:value-of select="count(.//Types/Type)" />
</td>
<td>
<xsl:value-of select="count(.//Message[Issue/@Level='Warning' or Issue/@Level='CriticalWarning'])" />
</td>
<td>
<xsl:value-of select="count(.//Message[Issue/@Level='Error' or Issue/@Level='CriticalError'])"/>
</td>
<td>
<xsl:value-of select="count(.//Message)"/>
</td>
</tr>
<xsl:call-template name="print-module-error-list">
<xsl:with-param name="module.id" select="$module.id"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="print-module-error-list">
<xsl:param name="module.id" />
<tr id="{$module.id}" class="errorlist" style="display: none">
<td></td>
<td colspan="6">
<table cellpadding="2" cellspacing="0" width="100%" class="inner-results">
<thead>
<tr class="inner-header">
<th scope='col'></th>
<th scope='col'></th>
<th scope='col'>Location</th>
<th scope='col'>Fix Category</th>
<th scope='col'>Certainty</th>
<th scope='col'>Rule</th>
</tr>
</thead>
<tbody>
<xsl:for-each select=".//Messages/Message">
<xsl:variable name="message.id" select="generate-id()" />
<xsl:variable name="rule.check.id" select="@CheckId" />
<xsl:variable name="rule.name" select="$fxcop.root/Rules/Rule[@CheckId = $rule.check.id]/Name" />
<xsl:variable name="rule.category" select="$fxcop.root/Rules/Rule[@CheckId = $rule.check.id]/@Category" />
<xsl:variable name="rule.description" select="$fxcop.root/Rules/Rule[@CheckId = $rule.check.id]/Description" />
<xsl:variable name="rule.url" select="$fxcop.root/Rules/Rule[@CheckId = $rule.check.id]/Url" />
<xsl:variable name="rule.file.name" select="$fxcop.root/Rules/Rule[@CheckId = $rule.check.id]/File/@Name" />
<xsl:variable name="rule.file.version" select="$fxcop.root/Rules/Rule[@CheckId = $rule.check.id]/File/@Version" />
<tr class="clickablerow" onclick="toggle('{$module.id}-{$message.id}', 'img-{$module.id}-{$message.id}')">
<td style="width: 10px">
<img id="img-{$module.id}-{$message.id}" src="{$applicationPath}/images/plus.png" />
</td>
<td style="width: 16px">
<xsl:choose>
<xsl:when test="./Issue/@Level = 'Warning'">
<img src="{$applicationPath}/images/warning.png">
<xsl:attribute name="title">
<xsl:value-of select="./Issue/@Level" />
</xsl:attribute>
</img>
</xsl:when>
<xsl:when test="./Issue/@Level = 'Error' or 'CriticalError'">
<img src="{$applicationPath}/images/error.png">
<xsl:attribute name="title">
<xsl:value-of select="./Issue/@Level" />
</xsl:attribute>
</img>
</xsl:when>
<xsl:otherwise>
<img src="{$applicationPath}/images/ok.png">
<xsl:attribute name="title">
<xsl:value-of select="./Issue/@Level" />
</xsl:attribute>
</img>
</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:value-of select="../../../../@Name" /> - <xsl:value-of select="../../@Name" />
</td>
<td>
<xsl:value-of select="@FixCategory" />
</td>
<td style="text-align: center">
<xsl:value-of select="./Issue/@Certainty" /> %
</td>
<td>
<xsl:value-of select="$rule.name" />
</td>
</tr>
<tr id="{$module.id}-{$message.id}" style="display: none">
<td></td>
<td colspan="5">
<div class="legend">
<div>
<table cellpadding="2" cellspacing="0" width="100%" class="inner-rule-description">
<tr>
<td>
<b>Rule:</b>
</td>
<td>
<xsl:value-of select="$rule.name" />
</td>
</tr>
<tr>
<td>
<b>Check Id:</b>
</td>
<td>
<xsl:value-of select="$rule.check.id" />
</td>
</tr>
<tr>
<td>
<b>Category:</b>
</td>
<td>
<xsl:value-of select="$rule.category" />
</td>
</tr>
<tr>
<td>
<b>Description:</b>
</td>
<td>
<xsl:value-of select="$rule.description" />
</td>
</tr>
<tr>
<td>
<b>Found at:</b>
</td>
<td>
<xsl:if test="./Issue/@Path">
<xsl:value-of select="./Issue/@Path" />\<xsl:value-of select="./Issue/@File" /> at line <xsl:value-of select="./Issue/@Line" />
</xsl:if>
</td>
</tr>
<tr>
<td>
<b>Resolution:</b>
</td>
<td>
<xsl:value-of select="./Issue" />
</td>
</tr>
<tr>
<td>
<b>Help Link:</b>
</td>
<td>
<a href="{$rule.url}" target="_blank">
<xsl:value-of select="$rule.url" />
</a>
</td>
</tr>
<tr>
<td>
<b>Rule File:</b>
</td>
<td>
<xsl:value-of select="$rule.file.name" /> Version: <xsl:value-of select="$rule.file.version" />
</td>
</tr>
</table>
</div>
</div>
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,40 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:variable name="report.root" select="cruisecontrol//FxCopReport" />
<xsl:if test="count($report.root/Targets/Target) + count($report.root/Exceptions/Exception) > 0" >
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<tr>
<td class="sectionheader" colspan="2">
FxCop Messages: <xsl:value-of select="count($report.root//Message)"/>, Warning Messages: <xsl:value-of select="count($report.root//Message[Issue/@Level='Warning' or Issue/@Level='CriticalWarning'])"/>, Error Messages: <xsl:value-of select="count($report.root//Message[Issue/@Level='Error' or Issue/@Level='CriticalError'])"/>
</td>
</tr>
<tr><td colspan="2"> </td></tr>
<xsl:apply-templates select="$report.root/Exceptions/Exception" />
<xsl:apply-templates select="$report.root/Targets/Target/Modules/Module" />
</table>
</xsl:if>
</xsl:template>
<xsl:template match="Exception">
<xsl:variable name="type" select="./Type" />
<xsl:variable name="message" select="./ExceptionMessage" />
<tr><td class="section-error"><xsl:value-of select="concat ($type, ': ', $message)" /></td></tr>
</xsl:template>
<xsl:template match="Module">
<xsl:variable name="name" select="./@Name"/>
<xsl:variable name="errors" select="count(.//Message[Issue/@Level='Error' or Issue/@Level='CriticalError'])"/>
<xsl:variable name="warnings" select="count(.//Message[Issue/@Level='Warning' or Issue/@Level='CriticalWarning'])"/>
<tr><td colspan="2"><xsl:value-of select="concat ($name, ': ', $errors, ' Errors, ', $warnings, ' Warnings')" /></td></tr>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,289 @@
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" />
<xsl:variable name="gendarme.root" select="//gendarme-output"/>
<xsl:template match="/">
<div id="gendarme-report">
<script language="javascript">
function expcol (sender, args)
{
var el = document.getElementById (args);
if (el.style.display == 'block') {
sender.textContent = '[show]';
el.style.display = 'none';
} else {
sender.textContent = '[hide]';
el.style.display = 'block';
}
}
</script>
<style type="text/css">
#gendarme-report
{
font-family: sans-serif;
}
#gendarme-report h1,
#gendarme-report h2,
#gendarme-report h3
{
font-size: 1.2em;
color: #68892F;
}
#gendarme-report h1
{
font-size: 1.4em;
}
#gendarme-report h2
{
font-size: 1.1em;
}
#gendarme-report p,
#gendarme-report li,
#gendarme-report b
{
font-size: 1em;
}
#gendarme-report p.where,
#gendarme-report p.problem,
#gendarme-report p.found,
#gendarme-report p.solution
{
font-family: monospace;
background-color: #F6F6F6;
border: 1px solid #DDDDDD;
padding: 10px;
}
#gendarme-report p.severity-Critical
{
border-left: 6px solid red;
}
#gendarme-report p.severity-High
{
border-left: 3px solid red;
}
#gendarme-report p.severity-Medium
{
border-left: 3px solid yellow;
}
#gendarme-report p.severity-Low
{
border-left: 3px solid green;
}
#gendarme-report p.severity-Audit
{
border-left: 3px solid blue;
}
#gendarme-report span.found
{
margin-left: 10px;
}
#gendarme-report div.toc
{
background-color: #F6F6F6;
border: 1px solid #DDDDDD;
padding: 10px;
float: right;
width: 400px;
}
#gendarme-report a:link,
#gendarme-report a:active,
#gendarme-report a:hover,
#gendarme-report a:visited
{
color: #9F75AD;
font-weight: bold;
text-decoration: none;
}
#gendarme-report a.go-to-rule
{
float: right;
color: gray;
font-size: 1em;
font-weight: normal;
}
</style>
<xsl:apply-templates select="$gendarme.root" />
</div>
</xsl:template>
<xsl:template name="print-defect-rules">
<xsl:param name="name" />
: <xsl:value-of select="count(//rule[@Name = $name]/target/defect)" /> defects
</xsl:template>
<xsl:template name="print-rules">
<xsl:param name="type" />
<p>
<b>
<xsl:value-of select="$type" />
</b>:
<xsl:choose>
<xsl:when test="count(rules/rule[@Type = $type]) = 0">
<ul>
<li>None</li>
</ul>
</xsl:when>
<xsl:otherwise>
<ul>
<xsl:for-each select="rules/rule[@Type = $type]">
<li>
<a href="{@Uri}" target="{@Name}">
<xsl:value-of select="text()" />
</a>
<xsl:call-template name="print-defect-rules">
<xsl:with-param name="name">
<xsl:value-of select="@Name" />
</xsl:with-param>
</xsl:call-template>
</li>
</xsl:for-each>
</ul>
</xsl:otherwise>
</xsl:choose>
</p>
</xsl:template>
<xsl:template match="gendarme-output">
<h1>Gendarme Report</h1>
<p>
Produced on <xsl:value-of select="@date" /> UTC.
</p>
<div class="toc">
<div align="center">
<b style="font-size: 10pt;">Table of contents</b>
</div>
<p style="font-size: 10pt;">
<a href="#s1">1.&#160;&#160;Summary</a>
<br />
<a href="#s1_1">&#160;&#160;1.1.&#160;&#160;List of assemblies searched</a>
<br />
<a href="#s1_2">&#160;&#160;1.2.&#160;&#160;List of rules used</a>
<br />
<a href="#s2">2.&#160;&#160;Reported defects</a>
<br />
<xsl:for-each select="results/rule">
<a href="#{@Name}">
&#160;&#160;2.<xsl:value-of select="position()" />.&#160;<xsl:value-of select="@Name" /><br />
</a>
</xsl:for-each>
</p>
</div>
<h1>
<a name="s1">Summary</a>
</h1>
<p>
<a href="http://www.mono-project.com/Gendarme">Gendarme</a> found <xsl:value-of select="count(//rule/target/defect)" /> potential defects using <xsl:value-of select="count(//rules/rule)" /> rules.
</p>
<p>
<h2>
List of assemblies analyzed
<a style="font-size: 66%;" href="#" onclick="expcol(this,'Assemblies_block'); return false;">[show]</a>
</h2>
<div id="Assemblies_block" style="display:none;">
<ul>
<xsl:for-each select="files/file">
<xsl:variable name="file">
<xsl:value-of select="@Name" />
</xsl:variable>
<li>
<xsl:value-of select="text()" />: <xsl:value-of select="count(//target[@Assembly = $file])" /> defects
</li>
</xsl:for-each>
</ul>
</div>
</p>
<p>
<h2>
List of rules used
<a style="font-size: 66%;" href="#" onclick="expcol(this,'Rules_block'); return false;">[show]</a>
</h2>
<div id="Rules_block" style="display:none;">
<xsl:call-template name="print-rules">
<xsl:with-param name="type">Assembly</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="print-rules">
<xsl:with-param name="type">Type</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="print-rules">
<xsl:with-param name="type">Method</xsl:with-param>
</xsl:call-template>
</div>
</p>
<h1>
<a name="s2">Reported Defects</a>
</h1>
<p>
<xsl:for-each select="results/rule">
<h3>
<xsl:value-of select="position()" />.&#160;<a name="{@Name}" />
<a href="{@Uri}" target="{@Name}">
<xsl:value-of select="@Name" />
</a>&#160;
<a style="font-size: 66%;" href="#" onclick="expcol(this,'{@Name}_block'); return false;">[hide]</a>
</h3>
<div id="{@Name}_block" style="display:block;">
<b>Problem:</b>
<p class="problem">
<xsl:value-of select="problem" />
</p>
<b>Solution:</b>
<p class="solution">
<xsl:value-of select="solution" />
</p>
<b>
<xsl:value-of select="count(target/defect)" /> defect(s) found:
</b>
<xsl:if test="count(target) != 0">
<xsl:for-each select="target">
<p class="found severity-{defect/@Severity}" title="{../@Name}">
<b>Target:</b>&#160;<xsl:value-of select="@Name" /><br/>
<b>Assembly:</b>&#160;<xsl:value-of select="@Assembly" /><br/>
<xsl:for-each select="defect">
<span class="found" title="{../../@Name} on {../@Name}">
<br/>
<b>Severity:</b>&#160;<xsl:value-of select="@Severity" />&#160;
<b>Confidence:</b>&#160;<xsl:value-of select="@Confidence" /><br/>
<xsl:if test="@Location != (../@Name)">
<b>Location:</b>&#160;<xsl:value-of select="@Location" /><br/>
</xsl:if>
<xsl:if test="string-length(@Source) &gt; 0">
<b>Source:</b>&#160;<xsl:value-of select="@Source" /><br/>
</xsl:if>
<xsl:if test="string-length(.) &gt; 0">
<b>Details:</b>&#160;<xsl:value-of select="." /><br/>
</xsl:if>
</span>
</xsl:for-each>
<a class="go-to-rule" href="#{../@Name}">
Go to <xsl:value-of select="../@Name" /> description
</a>
</p>
</xsl:for-each>
</xsl:if>
</div>
</xsl:for-each>
</p>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" />
<xsl:variable name="gendarme.root" select="//gendarme-output"/>
<xsl:template match="/">
<xsl:if test="count($gendarme.root/files/file) + count($gendarme.root/results/rule) > 0">
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<tr>
<td class="sectionheader" colspan="2">
Gendarme Report: found <xsl:value-of select="count($gendarme.root//rule/target/defect)" /> potential defects using <xsl:value-of select="count($gendarme.root/rules/rule)" /> rules.
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<xsl:apply-templates select="$gendarme.root/files/file" />
</table>
</xsl:if>
</xsl:template>
<xsl:template match="file">
<xsl:variable name="name" select="./@Name"/>
<xsl:variable name="defects" select="count(//target[@Assembly = $name])"/>
<tr>
<td colspan="2">
<xsl:value-of select="concat ($name, ': ', $defects, ' defects')" />
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
+84
View File
@@ -0,0 +1,84 @@
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:variable name="modification.list" select="/cruisecontrol/modifications/modification"/>
<table class="section-table" cellpadding="2" cellspacing="0" border="0">
<xsl:if test="/cruisecontrol/exception">
<tr><td class="header-title" colspan="2"><span style="font-size:160%;color:#600;font-weight:bold">BUILD EXCEPTION</span></td></tr>
<tr>
<td class="header-label" valign="top"><nobr>Error Message:</nobr></td>
<td class="header-data-error"><xsl:value-of select="/cruisecontrol/exception"/></td>
</tr>
</xsl:if>
<xsl:if test="/cruisecontrol/build/@error">
<tr><td class="header-title" colspan="2"><span style="font-size:150%;color:#600;font-weight:bold">BUILD FAILED</span></td></tr>
</xsl:if>
<xsl:if test="not (/cruisecontrol/build/@error) and not (/cruisecontrol/exception)">
<tr><td class="header-title" colspan="2"><span style="font-size:150%;color:#080;font-weight:bold">BUILD SUCCESSFUL</span></td></tr>
</xsl:if>
<tr>
<td class="header-label"><nobr>Project:</nobr></td>
<td class="header-data"><xsl:value-of select="/cruisecontrol/@project"/></td>
</tr>
<tr>
<td class="header-label"><nobr>Date of build:</nobr></td>
<td class="header-data"><xsl:value-of select="/cruisecontrol/build/@date"/></td>
</tr>
<tr>
<td class="header-label"><nobr>Running time:</nobr></td>
<td class="header-data"><xsl:value-of select="/cruisecontrol/build/@buildtime"/></td>
</tr>
<tr>
<td class="header-label"><nobr>Integration Request:</nobr></td>
<td class="header-data">
<xsl:value-of select="/cruisecontrol/request" />
</td>
</tr>
<xsl:if test="/cruisecontrol/integrationProperties/CCNetForceBuildReason">
<tr>
<td class="header-label">
<nobr>Reason for Force Build:</nobr>
</td>
<td class="header-data">
<xsl:value-of select="/cruisecontrol/integrationProperties/CCNetForceBuildReason"/>
</td>
</tr>
</xsl:if>
<xsl:apply-templates select="$modification.list">
<xsl:sort select="date" order="descending" data-type="text" />
</xsl:apply-templates>
</table>
</xsl:template>
<!-- Last Modification template -->
<xsl:template match="/cruisecontrol/modifications/modification">
<xsl:if test="position() = 1">
<tr>
<td class="header-label"><nobr>Last changed:</nobr></td>
<td class="header-data"><xsl:value-of select="date"/></td>
</tr>
<xsl:if test="string-length(issueUrl)!=0">
<tr>
<td class="header-label" valign="top"><nobr>Link to issue:</nobr></td>
<td class="header-data"><A><xsl:attribute name="HREF"><xsl:value-of select="issueUrl"/></xsl:attribute><xsl:value-of select="issueUrl"/></A></td>
</tr>
</xsl:if>
<tr>
<td class="header-label" valign="top"><nobr>Last log entry:</nobr></td>
<td class="header-data"><xsl:value-of select="comment"/></td>
</tr>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
+63
View File
@@ -0,0 +1,63 @@
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:variable name="modification.list" select="/cruisecontrol/modifications/modification"/>
<xsl:template match="/">
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<!-- Modifications -->
<tr>
<td class="sectionheader" colspan="5">
<br/><span style="font-size:125%"><b>MODIFICATIONS SINCE LAST BUILD</b> (<xsl:value-of select="count($modification.list)"/>)</span>
</td>
</tr>
<xsl:apply-templates select="$modification.list">
<xsl:sort select="date" order="descending" data-type="text" />
</xsl:apply-templates>
<xsl:if test="count($modification.list) = 0">
<tr><td>None since last build.</td></tr>
</xsl:if>
</table>
</xsl:template>
<!-- Modifications template -->
<xsl:template match="modification">
<tr>
<xsl:if test="position() mod 2=0">
<xsl:attribute name="class">section-oddrow</xsl:attribute>
</xsl:if>
<xsl:if test="position() mod 2!=0">
<xsl:attribute name="class">section-evenrow</xsl:attribute>
</xsl:if>
<td class="section-data" valign="top"><xsl:value-of select="@type"/></td>
<td class="section-data" valign="top"><xsl:value-of select="user"/></td>
<td class="section-data" valign="top">
<xsl:choose>
<xsl:when test="count(url) = 1 ">
<a>
<xsl:attribute name="href">
<xsl:value-of select="url" />
</xsl:attribute>
<xsl:if test="project != ''"><xsl:value-of select="project"/>/</xsl:if>
<xsl:value-of select="filename"/>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:if test="project != ''"><xsl:value-of select="project"/>/</xsl:if>
<xsl:value-of select="filename"/>
</xsl:otherwise>
</xsl:choose>
</td>
<td class="section-data" valign="top"><xsl:value-of select="comment"/></td>
<td class="section-data" valign="top"><xsl:value-of select="date"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>
@@ -0,0 +1,115 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:param name="applicationPath" select="'.'" />
<xsl:variable name="modification.list" select="/cruisecontrol/modifications/modification"/>
<xsl:key name="modifications-by-changelist" match="modification" use="changeNumber" />
<xsl:template match="/">
<script language="javascript">
function toggle (name, label)
{
var element = $(name);
if (element.css("display") == "none") {
element.css("display", "");
$(label).text("Hide files");
}
else {
element.css("display", "none");
$(label).text("Show files");
}
}
function hideAll()
{
$(".change-details").css("display", "none");
$(".view-toggle").text("Show files");
}
function showAll()
{
$(".change-details").css("display", "");
$(".view-toggle").text("Hide files");
}
</script>
<table class="section-table" cellpadding="2" cellspacing="0"
border="0" width="98%" style="border-collapse:collapse;" >
<!-- Modifications -->
<tr>
<td class="sectionheader" colspan="5">
Modifications since last build (<xsl:value-of select="count($modification.list)"/>)
</td>
</tr>
<tr>
<td colspan="5" class="section-data">
<a href="#" style="color: #00E;" onclick="hideAll(); return false;">Hide All Files</a>
<span style="padding-left: 1em; padding-right: 1em;"> </span>
<a href="#" style="color: #00E;" onclick="showAll(); return false;">Show All Files</a>
</td>
</tr>
<!-- See http://www.jenitennison.com/xslt/grouping/muenchian.html
for an explanation of this grouping trick. -->
<xsl:for-each select="/cruisecontrol/modifications/modification[count(. | key('modifications-by-changelist',changeNumber)[1]) = 1]">
<xsl:sort select="changeNumber" order="descending"/>
<xsl:variable name="change" select="changeNumber"/>
<tr>
<td>
<table width="100%" border="0">
<tr style="font-weight: bold;">
<td valign="top" width="25%">
<xsl:value-of select="changeNumber"/>
</td>
<td valign="top" width="25%">
<xsl:value-of select="user"/>
</td>
<td valign="top">
<xsl:value-of select="date"/>
</td>
<td valign="top" width="20%">
<xsl:value-of select="count(key('modifications-by-changelist', changeNumber))"/> Files
</td>
</tr>
<tr style="border-bottom: 1px dotted gray;">
<td class="section-data" valign="top" colspan="4">
<xsl:value-of select="comment" />
<br/><a href="#" style="color: #00E"
onclick="toggle('#change-{$change}','#toggle-{$change}'); return false;"
id="toggle-{$change}" class="view-toggle">Hide Files</a>
</td>
</tr>
</table>
<table width="100%" border="0" id="change-{$change}" class="change-details">
<xsl:for-each select="key('modifications-by-changelist',changeNumber)">
<xsl:sort select="project" />
<tr>
<xsl:if test="position() mod 2=0">
<xsl:attribute name="class">section-evenrow</xsl:attribute>
</xsl:if>
<xsl:if test="position() mod 2!=0">
<xsl:attribute name="class">section-oddrow</xsl:attribute>
</xsl:if>
<td class="section-data">
<xsl:value-of select="project" />
</td>
<td class="section-data" width="30%">
<xsl:value-of select="filename" />
</td>
<td class="section-data" width="7%">
<xsl:value-of select="@type" />
</td>
</tr>
</xsl:for-each>
</table>
</td>
</tr>
<tr style="border-bottom: 1px solid;">
<td colspan="0"></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
+174
View File
@@ -0,0 +1,174 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:variable name="buildresults" select="//msbuild" />
<xsl:choose>
<xsl:when test="count($buildresults) > 0">
<xsl:apply-templates select="$buildresults" />
</xsl:when>
<xsl:otherwise>
<h2>Log does not contain any XML output from MSBuild.</h2>
<p>
Please make sure that MSBuild is executed using the XmlLogger
(use the argument: <b style="white-space:nowrap">/logger:Kobush.Build.Logging.XmlLogger,Kobush.Build.dll</b>).
</p>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="msbuild">
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<tr>
<td class="sectionheader">
Build started <xsl:value-of select="@startTime"/>
</td>
</tr>
<tr>
<td>
<xsl:apply-templates/>
</td>
</tr>
<tr>
<td class="sectionheader">
<xsl:choose>
<xsl:when test="@success = 'false'">
Build FAILED
</xsl:when>
<xsl:otherwise>
Build succeeded
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
<tr>
<td>
<xsl:variable name="errors" select="//error" />
<xsl:variable name="warnings" select="//warning" />
<xsl:if test="count($errors)+count($warnings) > 0">
<xsl:apply-templates select="$errors"/>
<xsl:apply-templates select="$warnings"/>
<div style="color:orangered">
<xsl:value-of select="count($errors)"/> Error(s)
</div>
<div style="color:blue">
<xsl:value-of select="count($warnings)"/> Warning(s)
</div>
</xsl:if>
Time elapsed <xsl:value-of select="@elapsedTime"/>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="project">
<div style="color:#339900;margin:4 0">
Project "<xsl:value-of select="@file"/>"
<xsl:choose>
<xsl:when test="@name">
(<xsl:value-of select="@name"/> target(s)):
</xsl:when>
<xsl:otherwise>
(default targets):
</xsl:otherwise>
</xsl:choose>
</div>
<xsl:apply-templates/>
<xsl:if test="@success = 'false'">
<div style="color:dodgerblue;margin:2 0">
Done building project "<xsl:call-template name="projectName">
<xsl:with-param name="string">
<xsl:value-of select="@file" />
</xsl:with-param>
</xsl:call-template>" -- FAILED.
</div>
</xsl:if>
</xsl:template>
<xsl:template name="projectName">
<xsl:param name="string" />
<xsl:choose>
<xsl:when test="contains($string, '\')">
<xsl:call-template name="projectName">
<xsl:with-param name="string">
<xsl:value-of select="substring-after($string, '\')" />
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$string" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="target">
<div style="color:dodgerblue;margin:2 0">
Target "<xsl:value-of select="@name"/>":
</div>
<xsl:if test="*">
<div style="margin-left:10px;padding-left:10;border-left: 1px solid silver">
<xsl:apply-templates />
</div>
</xsl:if>
<xsl:if test="@success = 'false' and count(*//target/@success[.='false']) = 0">
<div style="color:dodgerblue;margin:2 0">
Done building target "<xsl:value-of select="@name"/>" -- FAILED.
</div>
</xsl:if>
</xsl:template>
<xsl:template match="task">
<div style="color:dodgerblue;margin:2 0">
Task "<xsl:value-of select="@name"/>":
</div>
<xsl:if test="*">
<div style="margin-left:10px;padding-left:10;border-left: 1px solid silver">
<xsl:apply-templates />
</div>
</xsl:if>
<div style="color:dodgerblue;margin:2 0">
Done executing task "<xsl:value-of select="@name"/>"
<xsl:if test="@success = 'false'">-- FAILED</xsl:if>.
</div>
</xsl:template>
<xsl:template match="message">
<xsl:choose>
<xsl:when test="@level = 'low'">
<div style="color:silver">
<xsl:value-of select="text()"/>
</div>
</xsl:when>
<xsl:when test="@level = 'normal'">
<div style="color:darkgray">
<xsl:value-of select="text()"/>
</div>
</xsl:when>
<xsl:otherwise>
<div style="color:dimgray">
<xsl:value-of select="text()"/>
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="error">
<div style="color:orangered">
<xsl:if test="@file != ''" >
<xsl:value-of select="@file"/>&#160;(<xsl:value-of select="@line"/>,<xsl:value-of select="@column"/>):&#160;
</xsl:if>
error&#160;<xsl:value-of select="@code"/>:&#160;<xsl:value-of select="text()" />
</div>
</xsl:template>
<xsl:template match="warning">
<div style="color:blue">
<xsl:if test="@file != ''" >
<xsl:value-of select="@file"/>&#160;(<xsl:value-of select="@line"/>,<xsl:value-of select="@column"/>):&#160;
</xsl:if>
warning&#160;<xsl:value-of select="@code"/>:&#160;<xsl:value-of select="text()" />
</div>
</xsl:template>
</xsl:stylesheet>
+53
View File
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright © 2006 by Christian Rodemeyer (mailto:christian@atombrenner.de) -->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
<xsl:template match="/">
<xsl:apply-templates select="//msbuild" />
</xsl:template>
<xsl:template match="msbuild">
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<tr><td class="sectionheader">
<br/><span style="font-weight:bold;font-size:125%">BUILD NOTES
<xsl:choose>
<xsl:when test="@error_count > 0">
(<span style="color:#800"><xsl:value-of select="@error_count"/> ERRORS</span>)
</xsl:when>
<xsl:when test="@warning_count > 0">
(<span style="color:#750"><xsl:value-of select="@warning_count"/> WARNINGS</span>)
</xsl:when>
<xsl:otherwise>
(<span style="color:#080">CLEAN BUILD</span>)
</xsl:otherwise>
</xsl:choose>
</span></td></tr>
<xsl:if test="@error_count = 0 and @warning_count = 0"> <tr><td><!--<img src="/ccnet/your_happy_image.jpg" alt="Happy Image :-)" />--> Juchuu !!!</td></tr></xsl:if>
<xsl:apply-templates select="project[error|warning]" />
</table>
</xsl:template>
<xsl:template match="project" >
<tr>
<td class="section-project">
<b>Project <xsl:value-of select="@name"/></b>:
</td>
</tr>
<tr>
<xsl:element name="td">
<xsl:attribute name="class">
<xsl:if test="../@error_count > 0">error</xsl:if>
<xsl:if test="../@error_count &lt;= 0">warning</xsl:if>
</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</tr>
</xsl:template>
<xsl:template match="error|warning">
<xsl:if test="@code!=''"><xsl:value-of select="@code" />: </xsl:if>
<xsl:value-of select="@message" /> in <xsl:value-of select="@name" /> <xsl:value-of select="@pos"/><br/>
</xsl:template>
<xsl:template match="message"></xsl:template>
</xsl:stylesheet>
File diff suppressed because it is too large Load Diff
+179
View File
@@ -0,0 +1,179 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<style>
td
{
text-align: left;
}
.tst_dur
{
text-align: right;
}
.tst_nok
{
text-align: center;
font-weight: bold;
background-color: fireBrick;
color: white;
}
.tst_ok
{
text-align: center;
font-weight: bold;
background-color: forestGreen;
color: white;
}
.tst_inc
{
text-align: center;
font-weight: bold;
background-color: yellow;
color: black;
}
.tst_nr
{
text-align: center;
font-weight: bold;
background-color: orange;
color: black;
}
.tst_unk
{
text-align: center;
font-weight: bold;
background-color: lightblue;
color: black;
}
</style>
<xsl:apply-templates select="//test-results" />
</xsl:template>
<xsl:template match="//test-results">
<xsl:variable name="cwd" select="./environment/@cwd" />
<h2><xsl:value-of select="substring(substring-after(@name, $cwd),2)"/></h2>
<table border="1"
cellSpacing="0"
cellPadding="5" >
<thead style="text-align: center;">
<td>Total</td>
<td class="tst_nok">Errors</td>
<td class="tst_nok">Failures</td>
<td class="tst_nr">Not run</td>
<td class="tst_inc">Inconclusive</td>
<td class="tst_nr">Ignored</td>
<td class="tst_nr">Skipped</td>
<td class="tst_nr">Invalid</td>
<td>Duration</td> </thead>
<tr>
<td><xsl:value-of select="@total"/></td>
<td ><xsl:value-of select="@errors"/></td>
<td ><xsl:value-of select="@failures"/></td>
<td ><xsl:value-of select="@not-run"/></td>
<td ><xsl:value-of select="@inconclusive"/></td>
<td ><xsl:value-of select="@ignored"/></td>
<td ><xsl:value-of select="@skipped"/></td>
<td ><xsl:value-of select="@invalid"/></td>
<td><xsl:value-of select="./test-suite/@time"/></td>
</tr>
</table>
<xsl:variable name="FailedOnes"
select=".//test-case[@success!='True']" />
<xsl:if test="count($FailedOnes) > 0">
<h3>Errors and Failures</h3>
<table width="100%"
border="1"
cellSpacing="0">
<thead style="text-align: center; font-size: large; font-weight:bold;background-color:#FF4000">
<td>Test Duration</td>
<td>Test Result</td>
<td>Test Name</td>
</thead>
<xsl:apply-templates select="$FailedOnes" />
</table>
</xsl:if>
<h3>Longest running tests</h3>
<ol>
<xsl:for-each select=".//test-case">
<xsl:sort select="@time" order="descending" data-type="number"/>
<xsl:if test="position() &lt; 21">
<li><xsl:value-of select= "@time"/> - <xsl:value-of select= "@name"/></li>
</xsl:if>
</xsl:for-each>
</ol>
<h2>Test Overview</h2>
<table border="1"
cellPadding="2"
cellSpacing="0" >
<thead style="text-align: center; font-size: large; font-weight:bold;background-color:#33CCFF">
<td>Test Duration</td>
<td>Test Result</td>
<td>Test Name</td>
</thead> <xsl:apply-templates select=".//test-case"/>
</table>
</xsl:template>
<xsl:template match="test-case" >
<tr >
<xsl:if test="@executed = 'False' ">
<xsl:attribute name="Title">
<xsl:value-of select="./reason/message" />
</xsl:attribute>
</xsl:if>
<td class="tst_dur"><xsl:value-of select="@time"/></td>
<xsl:choose>
<xsl:when test="@executed = 'False' ">
<td class="tst_nr">Not Run</td>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="@success = 'True' ">
<td class="tst_ok">Passed</td>
</xsl:when>
<xsl:otherwise>
<td class="tst_nok">Failed</td>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
<td>
<xsl:value-of select="@name"/>
</td>
</tr>
<xsl:if test="@success != 'True' ">
<tr bgcolor="#FF9900"><td colspan="3"><xsl:value-of select="./failure/message"/></td></tr>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/statistics">
<style>
*.pass{
background-color: #33ff99;
}
*.fail{
background-color: #ff6600;
}
*.unknown{
background-color: #ffffcc;
}
</style>
<p><pre><strong>Note: </strong>Only builds ran with the statistics publisher enabled will appear on this page!</pre></p>
<xsl:variable name="day" select="//timestamp/@day"/>
<xsl:variable name="month" select="//timestamp/@month"/>
<xsl:variable name="year" select="//timestamp/@year"/>
<xsl:variable name="totalCount" select="count(integration)"/>
<xsl:variable name="successCount" select="count(integration[@status='Success'])"/>
<xsl:variable name="failureCount" select="$totalCount - $successCount"/>
<xsl:variable name="totalCountForTheDay" select="count(integration[@day=$day and @month=$month and @year=$year])"/>
<xsl:variable name="successCountForTheDay" select="count(integration[@status='Success' and @day=$day and @month=$month and @year=$year])"/>
<xsl:variable name="failureCountForTheDay" select="$totalCountForTheDay - $successCountForTheDay"/>
<xsl:variable name="okPercent" select="$successCount div $totalCount * 100 "/>
<xsl:variable name="nokPercent" select="$failureCount div $totalCount * 100 "/>
<p>
Today is
<xsl:value-of select="$day"/>/<xsl:value-of select="$month"/>/<xsl:value-of select="$year"/> <br />
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<th>Integration Summary</th>
<th>For today</th>
<th>Overall</th>
</tr>
<tr>
<th align="left">Total Builds</th>
<td align="center"><xsl:value-of select="$totalCountForTheDay"/></td>
<td align="center"><xsl:value-of select="$totalCount"/></td>
</tr>
<tr>
<th align="left">Number of Successful</th>
<td align="center"><xsl:value-of select="$successCountForTheDay"/></td>
<td align="center"><xsl:value-of select="$successCount"/></td>
</tr>
<tr>
<th align="left">Number of Failed</th>
<td align="center"><xsl:value-of select="$failureCountForTheDay"/></td>
<td align="center"><xsl:value-of select="$failureCount"/></td>
</tr>
</table>
<br/>
<table border="0" cellspacing="1" >
<tr>
<td nowrap=""> Succesfull build rate : <xsl:value-of select="round($okPercent * 100) div 100" />%</td>
<td></td>
<td bgcolor="green" >
<xsl:attribute name="width"><xsl:value-of select="$okPercent" /></xsl:attribute>
</td>
<td bgcolor="red">
<xsl:attribute name="width"><xsl:value-of select="$nokPercent" /></xsl:attribute>
</td>
</tr>
</table>
</p>
<br/>
<table border="1" frame="above" rules="colls" cellpadding="2">
<thead>
<tr>
<th>Build Label</th>
<th>Status</th>
<xsl:for-each select="./integration[last()]/statistic">
<th>
<xsl:value-of select="./@name" />
</th>
</xsl:for-each>
</tr>
</thead>
<xsl:for-each select="./integration">
<xsl:sort select="position()" data-type="number" order="descending"/>
<xsl:variable name="colorClass">
<xsl:choose>
<xsl:when test="./@status = 'Success'">pass</xsl:when>
<xsl:when test="./@status = 'Unknown'" >unknown</xsl:when>
<xsl:otherwise>fail</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr>
<xsl:if test="position() mod 2=0">
<xsl:attribute name="class">section-oddrow</xsl:attribute>
</xsl:if>
<xsl:if test="position() mod 2!=0">
<xsl:attribute name="class">section-evenrow</xsl:attribute>
</xsl:if>
<th>
<xsl:value-of select="./@build-label"/>
</th>
<th class="{$colorClass}">
<xsl:value-of select="./@status"/>
</th>
<xsl:for-each select="./statistic">
<td align="center">
<xsl:value-of select="."/>
</td>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
+263
View File
@@ -0,0 +1,263 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/html4/strict.dtd">
<xsl:output method="html"/>
<xsl:param name="applicationPath"/>
<xsl:template match="/">
<xsl:variable name="tests.root" select="cruisecontrol//test-results" />
<div id="report">
<script>
function toggleDiv( imgId, divId )
{
eDiv = document.getElementById( divId );
eImg = document.getElementById( imgId );
if ( eDiv.style.display == "none" )
{
eDiv.style.display = "block";
eImg.src = "<xsl:value-of select="$applicationPath"/>/images/arrow_minus_small.gif";
}
else
{
eDiv.style.display = "none";
eImg.src = "<xsl:value-of select="$applicationPath"/>/images/arrow_plus_small.gif";
}
}
</script>
<h1>NUnit Test Results</h1>
<div id="summary">
<h3>Summary</h3>
<table>
<tbody>
<tr>
<td>Assemblies tested:</td>
<td><xsl:value-of select="count($tests.root)"/></td>
</tr>
<tr>
<td>Tests executed:</td>
<td><xsl:value-of select="count($tests.root//test-case[@executed = 'True'])"/></td>
</tr>
<tr>
<td>Passes:</td>
<td><xsl:value-of select="count($tests.root//test-case[@executed = 'True' and @success = 'True'])"/></td>
</tr>
<tr>
<td>Fails:</td>
<td><xsl:value-of select="count($tests.root//test-case[@executed = 'True' and @success = 'False'])"/></td>
</tr>
<tr>
<td>Ignored:</td>
<td><xsl:value-of select="count($tests.root//test-case[@executed = 'False'])"/></td>
</tr>
</tbody>
</table>
</div>
<div id="details">
<h3>Assembly Test Details:</h3>
<xsl:apply-templates select="$tests.root" />
</div>
</div>
</xsl:template>
<xsl:template match="test-results">
<xsl:variable name="test.suite.id" select="generate-id()" />
<xsl:variable name="test.suite.name" select="./@name"/>
<xsl:variable name="failure.count" select="count(.//results/test-case[@success='False'])" />
<xsl:variable name="ignored.count" select="count(.//results/test-case[@executed='False'])" />
<table cellpadding="2" cellspacing="0" border="0" width="98%">
<tr>
<td class="yellow-sectionheader" colspan="3" valign="top">
<xsl:choose>
<xsl:when test="$failure.count > 0">
<img src="{$applicationPath}/images/fxcop-critical-error.gif">
<xsl:attribute name="title">Failed tests: <xsl:value-of select="$failure.count" /></xsl:attribute>
</img>
</xsl:when>
<xsl:when test="$ignored.count > 0">
<img src="{$applicationPath}/images/fxcop-error.gif">
<xsl:attribute name="title">Ignored tests: <xsl:value-of select="$ignored.count" /></xsl:attribute>
</img>
</xsl:when>
<xsl:otherwise>
<img src="{$applicationPath}/images/check.jpg" width="16" height="16"/>
</xsl:otherwise>
</xsl:choose>
<input type="image" src="{$applicationPath}/images/arrow_minus_small.gif">
<xsl:attribute name="id">img<xsl:value-of select="$test.suite.id"/></xsl:attribute>
<xsl:attribute name="onclick">javascript:toggleDiv('img<xsl:value-of select="$test.suite.id"/>', 'divDetails<xsl:value-of select="$test.suite.id"/>');</xsl:attribute>
</input>&#160;<xsl:value-of select="$test.suite.name"/>
</td>
</tr>
</table>
<div>
<xsl:attribute name="id">divDetails<xsl:value-of select="$test.suite.id"/></xsl:attribute>
<blockquote>
<table>
<tr>
<th>Test Fixture</th>
<th>Status</th>
<th>Progress</th>
</tr>
<xsl:apply-templates select=".//test-suite[@result='Failure'][results/test-case]">
<xsl:sort select="@name" order="ascending" data-type="text"/>
</xsl:apply-templates>
<xsl:apply-templates select=".//test-suite[@result='Inconclusive'][results/test-case]">
<xsl:sort select="@name" order="ascending" data-type="text"/>
</xsl:apply-templates>
<xsl:apply-templates select=".//test-suite[@result='Success'][results/test-case/@executed='False']">
<xsl:sort select="@name" order="ascending" data-type="text"/>
</xsl:apply-templates>
<xsl:apply-templates select=".//test-suite[@result='Success'][results/test-case/@executed='True']" mode="success">
<xsl:sort select="@name" order="ascending" data-type="text"/>
</xsl:apply-templates>
</table>
</blockquote>
</div>
</xsl:template>
<xsl:template match="test-suite" mode="success">
<xsl:if test="count(results/test-case[@success='False']) + count(results/test-case[@executed='False']) = 0">
<xsl:apply-templates select="."/>
</xsl:if>
</xsl:template>
<xsl:template match="test-suite">
<xsl:variable name="passedtests.list" select="results/test-case[@success='True']"/>
<xsl:variable name="ignoredtests.list" select="results/test-case[@executed='False']"/>
<xsl:variable name="failedtests.list" select="results/test-case[@success='False']"/>
<xsl:variable name="tests.count" select="count(results/test-case)"/>
<xsl:variable name="passedtests.count" select="count($passedtests.list)"/>
<xsl:variable name="ignoredtests.count" select="count($ignoredtests.list)"/>
<xsl:variable name="failedtests.count" select="count($failedtests.list)"/>
<xsl:variable name="testName" select="@name"/>
<tr>
<td valign="top" width="30%">
<input type="image" src="{$applicationPath}/images/arrow_plus_small.gif">
<xsl:attribute name="id">imgTestCase_<xsl:value-of select="@name"/></xsl:attribute>
<xsl:attribute name="onClick">javascript:toggleDiv('imgTestCase_<xsl:value-of select="$testName"/>', 'divTest_<xsl:value-of select="$testName"/>');</xsl:attribute>
</input>
<a>
<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
<xsl:value-of select="@name"/>
</a>
</td>
<td width="70%">
<table border="0" cellspacing="1" width="100%">
<tr>
<xsl:if test="$passedtests.count > 0">
<xsl:variable name="passedtests.countpercent" select="($passedtests.count * 100) div $tests.count"/>
<td bgcolor="green">
<xsl:attribute name="width"><xsl:value-of select="$passedtests.countpercent"/>%</xsl:attribute>
&#160;
</td>
</xsl:if>
<xsl:if test="$ignoredtests.count > 0">
<xsl:variable name="ignoredtests.countpercent" select="($ignoredtests.count * 100) div $tests.count"/>
<td bgcolor="yellow">
<xsl:attribute name="width"><xsl:value-of select="$ignoredtests.countpercent"/>%</xsl:attribute>
&#160;
</td>
</xsl:if>
<xsl:if test="$failedtests.count > 0">
<xsl:variable name="failedtests.countpercent" select="($failedtests.count * 100) div $tests.count"/>
<td bgcolor="red">
<xsl:attribute name="width"><xsl:value-of select="$failedtests.countpercent"/>%</xsl:attribute>
&#160;
</td>
</xsl:if>
</tr>
</table>
<!--xsl:if test="$failedtests.count > 0 or $ignoredtests.count > 0"-->
<div style="display:none">
<xsl:attribute name="id">divTest_<xsl:value-of select="$testName"/></xsl:attribute>
<table border="0" cell-padding="6" cell-spacing="0" width="100%">
<xsl:apply-templates select="$failedtests.list"/>
<xsl:apply-templates select="$ignoredtests.list"/>
<xsl:apply-templates select="$passedtests.list"/>
</table>
</div>
<!--/xsl:if-->
</td>
<td valign="top">
(<xsl:value-of select="$passedtests.count"/>/<xsl:value-of select="$tests.count"/>)
</td>
</tr>
</xsl:template>
<xsl:template match="test-case[@success='True']">
<tr>
<xsl:if test="position() mod 2 = 0">
<xsl:attribute name="class">section-oddrow</xsl:attribute>
</xsl:if>
<td>
<img src="{$applicationPath}/images/check.jpg" width="16" height="16"/>
</td>
<td>
<xsl:call-template name="getTestName">
<xsl:with-param name="name" select="@name"/>
</xsl:call-template>
</td>
<td>
<xsl:value-of select="substring-after(failure/message, '-')"/>
</td>
</tr>
</xsl:template>
<xsl:template match="test-case[@success='False']">
<tr>
<xsl:if test="position() mod 2 = 0">
<xsl:attribute name="class">section-oddrow</xsl:attribute>
</xsl:if>
<td>
<img src="{$applicationPath}/images/fxcop-critical-error.gif"/>
</td>
<td>
<xsl:call-template name="getTestName">
<xsl:with-param name="name" select="@name"/>
</xsl:call-template>
</td>
<td bgcolor="gainsboro">
<xsl:value-of select="substring-after(failure/message, '-')"/><br/>
<xsl:value-of select="failure/message"/><br/>
<pre>
<xsl:value-of select="failure/stack-trace"/>
</pre>
</td>
</tr>
</xsl:template>
<xsl:template match="test-case[@executed='False']">
<tr>
<xsl:if test="position() mod 2 = 0">
<xsl:attribute name="class">section-oddrow</xsl:attribute>
</xsl:if>
<td>
<img src="{$applicationPath}/images/fxcop-error.gif"/>
</td>
<td>
<xsl:call-template name="getTestName">
<xsl:with-param name="name" select="@name"/>
</xsl:call-template>
</td>
<td>
<xsl:value-of select="substring-after(reason/message, '-')"/>
</td>
</tr>
</xsl:template>
<xsl:template name="getTestName">
<xsl:param name="name"/>
<xsl:choose>
<xsl:when test="contains($name, '.')">
<xsl:call-template name="getTestName">
<xsl:with-param name="name" select="substring-after($name, '.')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$name"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
+50
View File
@@ -0,0 +1,50 @@
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:variable name="testcase.list" select="//test-case"/>
<xsl:template match="/">
<table cellpadding="2" cellspacing="0" border="0" width="98%">
<!-- Unit Tests -->
<tr>
<td class="sectionheader" colspan="2">
Test Timing
</td>
</tr>
<xsl:apply-templates select="$testcase.list">
<xsl:sort select="@time" order="descending" data-type="number" />
</xsl:apply-templates>
<tr><td colspan="2"> </td></tr>
</table>
</xsl:template>
<xsl:template match="test-case">
<tr>
<xsl:if test="position() mod 2 = 0">
<xsl:attribute name="class">unittests-oddrow</xsl:attribute>
</xsl:if>
<td class="section-data">
<xsl:value-of select="./@name"/>
</td>
<td class="section-data">
<xsl:choose>
<xsl:when test="@executed[.='True']">
<xsl:value-of select="./@time"/>
</xsl:when>
<xsl:otherwise>
not run
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
+144
View File
@@ -0,0 +1,144 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html" />
<xsl:variable name="nunit2.result.list"
select="//test-results" />
<xsl:variable name="nunit2.suite.list"
select="$nunit2.result.list//test-suite" />
<xsl:variable name="nunit2.suite.count"
select="count($nunit2.result.list//test-suite)" />
<xsl:variable name="nunit2.case.list"
select="$nunit2.suite.list/results/test-case" />
<xsl:variable name="nunit2.case.count"
select="count($nunit2.case.list)" />
<xsl:variable name="nunit2.time"
select="sum($nunit2.result.list/test-suite[position()=1]/@time)" />
<xsl:variable name="nunit2.failure.list"
select="$nunit2.case.list/failure" />
<xsl:variable name="nunit2.failure.count"
select="count($nunit2.failure.list)" />
<xsl:variable name="nunit2.success.list"
select="$nunit2.case.list[@success='True']" />
<xsl:variable name="nunit2.success.count"
select="count($nunit2.success.list)" />
<xsl:variable name="nunit2.notrun.list"
select="$nunit2.case.list/reason" />
<xsl:variable name="nunit2.notrun.count"
select="count($nunit2.notrun.list)" />
<xsl:variable name="junit.suite.list"
select="//testsuite" />
<xsl:variable name="junit.suite.count"
select="count($junit.suite.list)" />
<xsl:variable name="junit.suite.error.list"
select="$junit.suite.list/error" />
<xsl:variable name="junit.suite.error.count"
select="count($junit.suite.error.list)" />
<xsl:variable name="junit.case.list"
select="$junit.suite.list/testcase" />
<xsl:variable name="junit.case.count"
select="count($junit.case.list)" />
<xsl:variable name="junit.time"
select="sum($junit.case.list/@time)" />
<xsl:variable name="junit.failure.list"
select="$junit.case.list/failure" />
<xsl:variable name="junit.failure.count"
select="count($junit.failure.list)" />
<xsl:variable name="junit.success.list"
select="$junit.case.list[@success='True']" />
<xsl:variable name="junit.success.count"
select="count($junit.success.list)" />
<xsl:variable name="junit.error.list"
select="$junit.case.list/error" />
<xsl:variable name="junit.error.count"
select="count($junit.error.list)" />
<xsl:variable name="total.time"
select="$nunit2.time + $junit.time" />
<xsl:variable name="total.notrun.count"
select="$nunit2.notrun.count" />
<xsl:variable name="total.suite.count"
select="$nunit2.suite.count + $junit.suite.count" />
<xsl:variable name="total.run.count"
select="$nunit2.case.count + $junit.case.count - $total.notrun.count" />
<xsl:variable name="total.failure.count"
select="$nunit2.failure.count + $junit.failure.count + $junit.error.count + $junit.suite.error.count" />
<xsl:template match="/">
<table cellpadding="2"
cellspacing="0"
border="0">
<!-- Unit Tests -->
<tr><td class="headernote" colspan="2"><br/><span style="font-size:125%;font-weight:bold">UNIT TESTING</span></td></tr>
<tr>
<td class="headernote"
colspan="2">Suites run:
<xsl:value-of select="$total.suite.count" />, Tests run:
<xsl:value-of select="$total.run.count" />, Failures:
<xsl:value-of select="$total.failure.count" />, Not run:
<xsl:value-of select="$total.notrun.count" />, Time:
<xsl:value-of select="$total.time" /> seconds</td>
</tr>
<xsl:choose>
<xsl:when test="$total.run.count = 0">
<tr>
<td colspan="2"
class="note"><span style="color:#750;font-weight:bold">WARNING: NO TESTS RUN</span></td>
</tr>
<tr>
<td colspan="2"
class="failurenote">This project doesn't have any tests. Write some?</td>
</tr>
</xsl:when>
<xsl:when test="$total.failure.count = 0">
<tr>
<td colspan="2"
class="successnote"><span style="font-weight:bold;color:#080">ALL TESTS PASSED</span></td>
</tr>
</xsl:when>
</xsl:choose>
<xsl:apply-templates select="$junit.success.list | $nunit2.success.list" />
<xsl:apply-templates select="$junit.suite.error.list" />
<xsl:apply-templates select="$junit.error.list" />
<xsl:apply-templates select="$junit.failure.list | $nunit2.failure.list" />
<xsl:apply-templates select="$nunit2.notrun.list" />
</table>
</xsl:template>
<!-- Unit Test Errors -->
<xsl:template match="error">
<tr>
<td class="errornote">
<xsl:value-of select="../@name" />
</td>
<td class="errornote"><span style="font-weight:bold;color:#400">ERROR</span></td>
</tr>
</xsl:template>
<!-- Unit Test Failures -->
<xsl:template match="failure">
<tr>
<td class="failurenote">
<xsl:value-of select="../@name" />
</td>
<td class="failurenote"><span style="color:#600;font-weight:bold">FAIL</span></td>
</tr>
</xsl:template>
<!-- Unit Test Successes -->
<xsl:template match="test-case[@success='True']">
<tr>
<xsl:if test="($junit.success.count + position()) mod 2 = 0">
<xsl:attribute name="class">oddrow</xsl:attribute>
</xsl:if>
<td class="successnote">
<xsl:value-of select="@name" />
</td>
<td class="successnote"><span style="color:#060">PASS</span></td>
</tr>
</xsl:template>
<!-- Unit Test Warnings -->
<xsl:template match="reason">
<tr>
<td class="warningnote">
<xsl:value-of select="../@name" />
</td>
<td class="warningnote"><span style="color:#750;font-weight:bold">WARN</span></td>
</tr>
</xsl:template>
</xsl:stylesheet>
+70
View File
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2004/07/xpath-functions" xmlns:xdt="http://www.w3.org/2004/07/xpath-datatypes">
<xsl:output method="html"/>
<xsl:variable name="VIL.root" select="//MetricReport"/>
<xsl:template match="/">
<html>
<head><title>Metrics Report</title></head>
<style>
.Title {font-family: Verdana; font-size: 14pt; color: black; font-weight: bold}
.ListItem {font-family: Verdana; font-size: 12pt; color: black; font-weight: bold}
.ColumnHeader {font-family: Verdana; font-size: 7pt; background-color:white; color: black}
.Information {font-family: Verdana; font-size: 10pt; color: black; font-weight: bold; text-align: left}
</style>
<body bgcolor="white" alink="Black" vlink="Black" link="Black">
<xsl:apply-templates select="$VIL.root"/>
</body>
</html>
</xsl:template>
<xsl:template match="MetricReport">
<div class="Title">Metric report</div>
<xsl:apply-templates select="Specification"/>
<xsl:apply-templates select="Results"/>
</xsl:template>
<xsl:template match="Specification">
<br/>
<xsl:apply-templates select="Assemblies"/>
</xsl:template>
<xsl:template match="Results">
<br/>
<xsl:apply-templates select="CodeElement"/>
</xsl:template>
<xsl:template match="CodeElement">
<div class="ListItem"><xsl:value-of select="@name"/></div>
<table border="1" cellspacing="0" width="100%">
<tr>
<xsl:for-each select="Metric">
<th class="ColumnHeader"><xsl:value-of select="@label"/></th>
</xsl:for-each>
</tr>
<tr>
<xsl:for-each select="Metric">
<td><xsl:value-of select="."/></td>
</xsl:for-each>
</tr>
</table>
</xsl:template>
<xsl:template match="Assemblies">
<table border="0">
<tr >
<th class="ColumnHeader" align="left">Assemblies:</th>
</tr>
<xsl:apply-templates select="Assembly"/>
</table>
</xsl:template>
<xsl:template match="Assembly">
<tr>
<td><xsl:value-of select="."/></td>
</tr>
</xsl:template>
</xsl:stylesheet>