blob: b394cdbe60e8cf7d2f73f93a909d1e780c81c778 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
<?xml version="1.0" encoding='shift_jis' standalone='yes' ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xml:lang="ja">
<xsl:template match="/">
<HTML>
<HEAD>
<TITLE>Test Report</TITLE>
<STYLE>
TABLE { color:#222222; font-size:10pt; font-family:'�l�r �S�V�b�N' 'sanserif'; }
TH { font-weight:normal; color:#FFFFFF; background-color:#888888; }
TR.check { background-color:#EEEEEE }
TD.check { background-color:#EEEEEE }
H1 { color:#111111; font-family:'Times New Roman' '�l�r �o����' 'serif'; border-style:solid; border-width:0px; border-bottom-width:3px; border-bottom-color:#444488; }
H2 { color:#222222; font-family:'Times New Roman' '�l�r �o����' 'serif'; border-style:solid; border-width:0px; border-bottom-width:2px; border-bottom-color:#444488; }
H3 { color:#333333; font-family:'Times New Roman' '�l�r �o����' 'serif'; border-style:solid; border-width:0px; border-bottom-width:1px; border-bottom-color:#444488; margin-bottom:8px; }
H4 { color:#444444; font-family:'Times New Roman' '�l�r �o����' 'serif'; border-style:solid; border-width:0px; border-bottom-width:1px; border-bottom-color:#CCCCDD; margin-bottom:8px; }
H5 { color:#555555; font-family:'Times New Roman' '�l�r �o����' 'serif'; border-style:solid; border-width:0px; border-bottom-width:1px; border-bottom-color:#EEEEFF; margin-bottom:8px; }
H6 { color:#666666; font-family:'Times New Roman' '�l�r �o����' 'serif'; border-style:solid; border-width:0px; border-bottom-width:1px; border-bottom-color:#F8F8FF; margin-bottom:8px; }
SPAN.good { color:#006666; font-weight:bold; }
SPAN.critical { color:#880000; font-weight:bold; }
</STYLE>
</HEAD>
<BODY>
<H1>Test Report</H1>
<xsl:apply-templates select="/TestRun/*"/>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="FailedTests">
<H2>FailedTests</H2>
<xsl:choose>
<xsl:when test="FailedTest">
<TABLE>
<TR>
<TH>id</TH>
<TH>Name</TH>
<TH>FailureType</TH>
<TH>Location</TH>
<TH>Message</TH>
</TR>
<xsl:apply-templates select="FailedTest"/>
</TABLE>
</xsl:when>
<xsl:otherwise>
<SPAN class="good">No failed test.</SPAN>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="FailedTest">
<TR>
<TD align="right" valign='top'><xsl:value-of select="@id"/></TD>
<TD valign='top'><xsl:apply-templates select="Name"/></TD>
<TD valign='top'><xsl:apply-templates select="FailureType"/></TD>
<TD valign='top'><xsl:apply-templates select="Location"/></TD>
<TD valign='top'><pre><xsl:apply-templates select="Message"/></pre></TD>
</TR>
</xsl:template>
<xsl:template match="Name|FailureType|Message"><xsl:value-of select="."/></xsl:template>
<xsl:template match="Location">
<xsl:if test=".">
line #<xsl:value-of select="Line"/> in <xsl:value-of select="File"/>
</xsl:if>
</xsl:template>
<xsl:template match="SuccessfulTests">
<H2>SuccessfulTests</H2>
<xsl:choose>
<xsl:when test="Test">
<TABLE>
<TR>
<TH>id</TH>
<TH>Name</TH>
</TR>
<xsl:apply-templates select="Test"/>
</TABLE>
</xsl:when>
<xsl:otherwise>
<SPAN class="critical">No sucessful test.</SPAN>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="Test">
<TR>
<TD align="right"><xsl:value-of select="@id"/></TD>
<TD><xsl:apply-templates select="Name"/></TD>
</TR>
</xsl:template>
<xsl:template match="Statistics">
<H2>Statistics</H2>
<TABLE>
<TR>
<TH>Status</TH>
<TH>Number</TH>
</TR>
<TR>
<TD>Tests</TD>
<TD align="right"><xsl:value-of select="Tests"/></TD>
</TR>
<TR>
<TD>FailuresTotal</TD>
<TD align="right"><xsl:value-of select="FailuresTotal"/></TD>
</TR>
<TR>
<TD>Errors</TD>
<TD align="right"><xsl:value-of select="Errors"/></TD>
</TR>
<TR>
<TD>Failures</TD>
<TD align="right"><xsl:value-of select="Failures"/></TD>
</TR>
</TABLE>
</xsl:template>
</xsl:stylesheet>
|