File: report.html

package info (click to toggle)
junit2html 31.0.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 608 kB
  • sloc: xml: 3,208; python: 1,075; makefile: 6; sh: 5
file content (135 lines) | stat: -rw-r--r-- 4,859 bytes parent folder | download | duplicates (2)
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
126
127
128
129
130
131
132
133
134
135
{% extends "base.html" %}
{% block content %}
<h1>
    Test Report : {{ report.title }}
</h1>

{% if show_toc %}
<a id="toc"></a>
<table class="index-table">
    <tr>
        <td>
            <ul class="toc">
            {% for suite in report %}
                {% for classname in suite.classes %}
                <li>{{classname}}
                <ul>
                    {% for test in suite.classes[classname].cases %}
                    <li class="outcome outcome-{{test.outcome()}}"><a href="#{{test.anchor()}}">{{test.name}}</a>{{test.display_suffix}}</li>
                    {% endfor %}
                </ul>
                </li>
                {% endfor %}
            {% endfor %}
            </ul>
        </td>
        <td class="failure-index">
            <ul class="toc">
            {% for suite in report %}
                {% for classname in suite.classes %}
                    {% for test in suite.classes[classname].cases %}
                    {% if test.failed() %}
                    <li><a href="#{{test.anchor()}}">{{test.prefix()}} {{test.fullname()}}</a></li>
                    {% endif %}
                    {% endfor %}
                {% endfor %}
            {% endfor %}
            </ul>
        </td>
    </tr>
</table>
{% endif %}

{% for suite in report %}
    <div class="testsuite">
        <h2>Test Suite: {{ suite.name }}</h2>
        <a id="{{ suite.anchor() }}"></a>
        {% if suite.package %}
        <span>Package: {{suite.package}}</span>
        {% endif %}
        {% if suite.properties %}
        <h3>Suite Properties</h3>
        <table class="proplist">
            {% for prop in suite.properties %}
            <tr>
                <th>{{prop.name}}</th><td>{{prop.value}}</td>
            </tr>
            {% endfor %}
        </table>
        {% endif %}
        <h3>Results</h3>
        <table class="proplist">
            <tr>
                <th>Duration</th><td>{{suite.duration |round(3)}} sec</td>
            </tr>
            <tr>
                <th>Tests</th><td>{{suite.all() |length}}</td>
            </tr>
            <tr>
                <th>Failures</th><td>{{suite.failed()| length}}</td>
            </tr>
        </table>

        <div class="testclasses">
            <h3>Tests</h3>
            {% for classname in suite.classes %}
            <div class="testclass">
                <h4>{{classname}}</h4>
                <div class="testcases">
                {% for test in suite.classes[classname].cases %}
                    <div class="test outcome outcome-{{test.outcome()}}">
                        <a id="{{test.anchor()}}"></a>
                        <table class="proplist">
                            <tr><th>Test case:</th><td><b>{{test.name}}</b></td></tr>
                            <tr><th>Outcome:</th><td>{{test.outcome().title()}}</td></tr>
                            <tr><th>Duration:</th><td>{{test.duration|round(3)}} sec</td></tr>
                        {% if test.failed() %}
                            <tr><th>Failed</th><td>{{test.failure_msg}}</td></tr>
                        {% endif %}
                        {% if test.skipped %}
                            <tr><th>Skipped</th><td>{{test.skipped_msg}}</td></tr>
                        {% endif %}
                        </table>

                        {% if test.failed() %}
                        <pre>{{test.failure}}</pre>
                        {% endif %}
                        {% if test.skipped %}
                        <pre>{{test.skipped}}</pre>
                        {% endif %}

                        {% if test.properties %}
                        <table class="proplist">
                            {% for prop in test.properties %}
                            <tr>
                                <th>{{prop.name}}</th><td>{{prop.value}}</td>
                            </tr>
                            {% endfor %}
                        </table>
                        {% endif %}
                        {% if test.stdout %}
                        <div class="stdout"><i>Stdout</i><br>
                            <pre>{{test.stdout}}</pre>
                        </div>
                        {% endif %}
                        {% if test.stderr %}
                        <div class="stderr"><i>Stderr</i><br>
                            <pre>{{test.stderr}}</pre>
                        </div>
                        {% endif %}
                    </div>
                {% endfor %}
                </div>
            </div>
            {% endfor %}
        </div>
    </div>
    {% if suite.stdout or suite.stderr %}
        <h3>Suite stdout:</h3>
        <pre class="stdio">{{suite.stdout}}</pre>
        <h3>Suite stderr:</h3>
        <pre class="stdio">{{suite.stderr}}</pre>
    {% endif %}
{% endfor %}

{% endblock %}