summaryrefslogtreecommitdiffstats
path: root/non-puppet/qtmetrics2/templates
diff options
context:
space:
mode:
authorJuha Sippola <juhasippola@outlook.com>2015-09-21 16:52:01 +0300
committerTony Sarajärvi <tony.sarajarvi@theqtcompany.com>2015-09-23 09:40:13 +0000
commitec7ce827151e562050fcc2eb9e8a8f9c67e9cfa1 (patch)
treebea5f627c50b430c200dd061e70d9baabaa0ec04 /non-puppet/qtmetrics2/templates
parentccf8014eecf930a7d1ab512c40b07767f403980a (diff)
Qt Metrics 2 (v0.31): Blacklisted passed testfunctions page
New page to list blacklisted passed test functions since a specific date to be able to point out the ones where the blacklisted tag could maybe be removed. The date scope can be configured in the ini file. The query duration is about 50 seconds with the scope of last five days. Change-Id: I21c37182c282d68838ec432c06f4d1c428312d48 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
Diffstat (limited to 'non-puppet/qtmetrics2/templates')
-rw-r--r--non-puppet/qtmetrics2/templates/about.html4
-rw-r--r--non-puppet/qtmetrics2/templates/home.html7
-rw-r--r--non-puppet/qtmetrics2/templates/testfunctions_bpass.html112
-rw-r--r--non-puppet/qtmetrics2/templates/testfunctions_bpass_data.html194
-rw-r--r--non-puppet/qtmetrics2/templates/testset_testfunctions.html25
5 files changed, 328 insertions, 14 deletions
diff --git a/non-puppet/qtmetrics2/templates/about.html b/non-puppet/qtmetrics2/templates/about.html
index bef8584..5611348 100644
--- a/non-puppet/qtmetrics2/templates/about.html
+++ b/non-puppet/qtmetrics2/templates/about.html
@@ -34,7 +34,7 @@
/**
* About window content
- * @since 20-09-2015
+ * @since 21-09-2015
* @author Juha Sippola
*/
@@ -52,4 +52,4 @@ and the global Qt developer community are the target audience. For detailed desc
<p>See the <strong><a href="https://wiki.qt.io/Qt_Metrics_2_Backlog" target="_blank">backlog</a></strong>
for development items currently identified or in progress.</p>
-<p><small>Version 0.30 (20-Sep-2015)</small></p>
+<p><small>Version 0.31 (21-Sep-2015)</small></p>
diff --git a/non-puppet/qtmetrics2/templates/home.html b/non-puppet/qtmetrics2/templates/home.html
index 24119e0..185e257 100644
--- a/non-puppet/qtmetrics2/templates/home.html
+++ b/non-puppet/qtmetrics2/templates/home.html
@@ -34,7 +34,7 @@
/**
* Home page
- * @since 18-09-2015
+ * @since 21-09-2015
* @author Juha Sippola
*/
@@ -133,6 +133,11 @@
<a class="btn btn-primary btn-xs" href="{{ flakyRoute }}" role="button">flaky</a>
<a class="btn btn-primary btn-xs" href="{{ topTestfunctionsRoute }}" role="button">test functions</a>
</div>
+<br>
+<p>See blacklisted tests where tagging could be removed:</p>
+<div>
+<a class="btn btn-primary btn-xs" href="{{ bpassedTestfunctionsRoute }}" role="button">test functions</a>
+</div>
</div> {# .col-md... #}
</div> {# .row #}
diff --git a/non-puppet/qtmetrics2/templates/testfunctions_bpass.html b/non-puppet/qtmetrics2/templates/testfunctions_bpass.html
new file mode 100644
index 0000000..1dc5394
--- /dev/null
+++ b/non-puppet/qtmetrics2/templates/testfunctions_bpass.html
@@ -0,0 +1,112 @@
+{#
+#############################################################################
+##
+## Copyright (C) 2015 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Quality Assurance module of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:LGPL21$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see http://www.qt.io/terms-conditions. For further
+## information use the contact form at http://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 2.1 or version 3 as published by the Free
+## Software Foundation and appearing in the file LICENSE.LGPLv21 and
+## LICENSE.LGPLv3 included in the packaging of this file. Please review the
+## following information to ensure the GNU Lesser General Public License
+## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+##
+## As a special exception, The Qt Company gives you certain additional
+## rights. These rights are described in The Qt Company LGPL Exception
+## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+/**
+ * Blacklisted passes (testfunctions) page
+ * @since 21-09-2015
+ * @author Juha Sippola
+ */
+
+#}
+
+{% include "header.html" %}
+
+<ol class="breadcrumb">
+{% for link in breadcrumb %}
+<li><a href="{{ link.link }}">{{ link.name }}</a></li>
+{% endfor %}
+<li class="active">blacklisted test function passes</li>
+</ol>
+
+<div class="container-fluid">
+<div class="row">
+
+<div class="col-sm-12 col-md-12 main">
+
+{##### Title #####}
+
+<h1 class="page-header">
+Test Function Blacklisted Passes
+<button type="button" class="btn btn-xs btn-info" data-toggle="collapse" data-target="#info" aria-expanded="false" aria-controls="info">
+<span class="glyphicon glyphicon-info-sign"></span>
+</button>
+<small>{{ refreshed }}</small>
+</h1>
+
+{##### Info well #####}
+
+<div class="collapse" id="info">
+<div class="well infoWell">
+<span class="glyphicon glyphicon-info-sign"></span> <strong>Test Function Blacklisted Passes</strong><br>
+<ul>
+<li>Lists the test functions in <strong>{{ masterProject }} {{ masterState }}</strong> builds where tagged
+as blacklisted but have not failed or skipped during the last {{ lastDays }} days.</li>
+<li>In these cases the blacklisted tag could maybe be removed in the CI so that the test function would be
+tested normally in the future builds.</li>
+<li><strong>Summary</strong> shows the count of test functions in each testset (any configuration or branch)
+with blacklisted passes</li>
+<li><strong>Blacklisted Passes</strong> shows the list of test functions with blacklisted passes by testset
+and configuration. The testset link opens a page where the test functions are listed by branch.</li>
+</ul>
+</div>
+</div>
+
+{##### List #####}
+
+<div id="testfunctions_blacklisted_passed_data">
+<div class="panel panel-primary">
+<div class="panel-heading">
+<h4 class="panel-title bold">Blacklisted Passes <small>(last {{ lastDays }} days since {{ sinceDate }})</small></h4>
+</div>
+</div>
+<div class="progress data_loading">
+<div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">
+</div>
+</div>
+<div class="alert alert-warning" role="alert">
+<span class="glyphicon glyphicon-time"></span> <strong>Please wait:</strong> Extracting the data will be ready in less than a minute!
+</div>
+</div> {# testfunctions_blacklisted_passed_data #}
+
+</div> {# .col... #}
+</div> {# .row #}
+</div> {# .container-fluid #}
+
+{% include "footer.html" %}
+
+{# Local scripts for this page #}
+<script src="scripts/ajax.js"></script>
+<script src="scripts/tooltip.js"></script>
+
+{% include "close.html" %}
diff --git a/non-puppet/qtmetrics2/templates/testfunctions_bpass_data.html b/non-puppet/qtmetrics2/templates/testfunctions_bpass_data.html
new file mode 100644
index 0000000..117db0d
--- /dev/null
+++ b/non-puppet/qtmetrics2/templates/testfunctions_bpass_data.html
@@ -0,0 +1,194 @@
+{#
+#############################################################################
+##
+## Copyright (C) 2015 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the Quality Assurance module of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:LGPL21$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see http://www.qt.io/terms-conditions. For further
+## information use the contact form at http://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 2.1 or version 3 as published by the Free
+## Software Foundation and appearing in the file LICENSE.LGPLv21 and
+## LICENSE.LGPLv3 included in the packaging of this file. Please review the
+## following information to ensure the GNU Lesser General Public License
+## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+##
+## As a special exception, The Qt Company gives you certain additional
+## rights. These rights are described in The Qt Company LGPL Exception
+## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+/**
+ * Blacklisted passes (testfunctions) data
+ * @since 21-09-2015
+ * @author Juha Sippola
+ */
+
+#}
+
+{# Failed/passed bar area size in px #}
+{% set BAR_AREA = 120 %}
+
+{# testfunctions as Testfunction objects
+/**
+ * @var Testfunction[] testfunctions
+ */
+#}
+
+{##### Summary #####}
+
+<div class="panel panel-primary">
+<div class="panel-heading">
+<h4 class="panel-title bold">Summary <small>(last {{ lastDays }} days since {{ sinceDate }})</small></h4>
+</div>
+<div class="panel-body">
+<div class="table-responsive">
+<table class="table table-striped">
+<thead>
+<tr>
+<th>testset</th>
+<th>project</th>
+<th class="leftBorder center">count</th>
+<th class="showInLargeDisplay"></th>
+</tr>
+</thead>
+<tbody>
+{# Calculate max result count for the bar #}
+{% set prevTestsetName = '' %}
+{% set prevProjectName = '' %}
+{% set testfunctionCount = 0 %}
+{% set maxCount = 1 %}
+{% for testfunction in testfunctions %}
+{% if (testfunction.getTestsetName == prevTestsetName) and (testfunction.getTestsetProjectName == prevProjectName) %}
+{% set testfunctionCount = testfunctionCount + 1 %}
+{% else %}
+{% if testfunctionCount > maxCount %}
+{% set maxCount = testfunctionCount %}
+{% endif %}
+{% set testfunctionCount = 1 %}
+{% endif %}
+{% set prevTestsetName = testfunction.getTestsetName %}
+{% set prevProjectName = testfunction.getTestsetProjectName %}
+{% endfor %}
+
+{# Print testsets #}
+{% set prevTestsetName = '' %}
+{% set prevProjectName = '' %}
+{% set testfunctionCount = 0 %}
+{% set bar = 0 %}
+{% for testfunction in testfunctions %}
+
+{# First row #}
+{% if prevTestsetName == '' %}
+<tr>
+<td>{{ testfunction.getTestsetName }}</td>
+<td>{{ testfunction.getTestsetProjectName }}</td>
+{% set testfunctionCount = 1 %}
+
+{# Same testset: Increase the counter #}
+{% elseif (testfunction.getTestsetName == prevTestsetName) and (testfunction.getTestsetProjectName == prevProjectName) %}
+{% set testfunctionCount = testfunctionCount + 1 %}
+
+{# New testset: Print count for previous one and start new row #}
+{% else %}
+{% set bar = ((BAR_AREA/maxCount) * testfunctionCount)|round(0, 'floor') %}
+{% if (testfunctionCount > 0) and (bar == 0) %}
+{% set bar = 1 %}
+{% endif %}
+<td class="leftBorder center">{{ testfunctionCount }}</td>
+<td class="center showInLargeDisplay">
+<div>
+<div class="floatLeft blueBackground" style="width: {{ bar }}px">&nbsp;</div>
+</div>
+</td>
+</tr>
+<tr>
+<td>{{ testfunction.getTestsetName }}</td>
+<td>{{ testfunction.getTestsetProjectName }}</td>
+{% set testfunctionCount = 1 %}
+{% endif %}
+{% set prevTestsetName = testfunction.getTestsetName %}
+{% set prevProjectName = testfunction.getTestsetProjectName %}
+{% endfor %}{# testfunction #}
+
+{# Print count for last one #}
+{% if testfunctionCount > 0 %}
+{% set bar = ((BAR_AREA/maxCount) * testfunctionCount)|round(0, 'floor') %}
+{% if (testfunctionCount > 0) and (bar == 0) %}
+{% set bar = 1 %}
+{% endif %}
+<td class="leftBorder center">{{ testfunctionCount }}</td>
+<td class="center showInLargeDisplay">
+<div>
+<div class="floatLeft blueBackground" style="width: {{ bar }}px">&nbsp;</div>
+</div>
+</td>
+
+</tr>
+{% endif %}
+</tbody>
+</table>
+</div> {# .table-responsive #}
+</div> {# .panel-body #}
+</div> {# .panel... #}
+
+{##### List #####}
+
+<div class="panel panel-primary">
+<div class="panel-heading">
+<h4 class="panel-title bold">Blacklisted Passes <small>(last {{ lastDays }} days since {{ sinceDate }})</small></h4>
+</div>
+<div class="panel-body">
+<div class="table-responsive">
+<table class="table table-striped">
+<thead>
+<tr>
+<th>test function</th>
+<th>testset</th>
+<th class="showInLargeDisplay">project</th>
+<th class="showInLargeDisplay">configuration</th>
+</tr>
+</thead>
+<tbody>
+
+{# Print testfunctions #}
+{% for testfunction in testfunctions %}
+<tr>
+{# Testfunction name #}
+{% if testfunction.getName|length > constant('Testfunction::SHORT_NAME_LENGTH') %}
+<td><span class="clickOnTouch" data-toggle="tooltip" data-placement="top" title="{{ testfunction.getName }}">{{ testfunction.getShortName }}</span></td>
+{% else %}
+<td>{{ testfunction.getName }}</td>
+{% endif %}
+
+{# Testset name #}
+{% set link = testsetRoute ~ '/' ~ testfunction.getTestsetName|url_encode ~ '/' ~ testfunction.getTestsetProjectName|url_encode ~ '/' ~ testfunction.getConfName|url_encode %}
+<td><a href="{{ link }}">{{ testfunction.getTestsetName }}</a></td>
+
+{# Project name #}
+<td class="showInLargeDisplay">{{ testfunction.getTestsetProjectName }}</td>
+
+{# Conf name #}
+<td class="showInLargeDisplay">{{ testfunction.getConfName }}</td>
+
+</tr>
+{% endfor %}{# testfunction #}
+</tbody>
+</table>
+</div> {# .table-responsive #}
+</div> {# .panel-body #}
+</div> {# .panel... #}
diff --git a/non-puppet/qtmetrics2/templates/testset_testfunctions.html b/non-puppet/qtmetrics2/templates/testset_testfunctions.html
index 04b989d..d2ee081 100644
--- a/non-puppet/qtmetrics2/templates/testset_testfunctions.html
+++ b/non-puppet/qtmetrics2/templates/testset_testfunctions.html
@@ -34,7 +34,7 @@
/**
* Testset page (list of test functions)
- * @since 17-09-2015
+ * @since 21-09-2015
* @author Juha Sippola
*/
@@ -102,7 +102,8 @@
<li>results: <span class="glyphicon glyphicon-remove red"></span> = {{ constant('TestfunctionRun::RESULT_FAILURE') }},
<span class="glyphicon glyphicon-ok-sign red"></span> = {{ constant('TestfunctionRun::RESULT_SUCCESS_UNEXPECTED') }},
<span class="glyphicon glyphicon-remove-sign green"></span> = {{ constant('TestfunctionRun::RESULT_FAILURE_EXPECTED') }},
-<span class="glyphicon glyphicon-ban-circle gray"></span> = {{ constant('TestfunctionRun::RESULT_SKIP') }}</li>
+<span class="glyphicon glyphicon-ban-circle gray"></span> = {{ constant('TestfunctionRun::RESULT_SKIP') }},
+<span class="glyphicon glyphicon-ok green"></span> = {{ constant('TestfunctionRun::RESULT_SUCCESS') }} (blacklisted only)</li>
</ul>
</li>
<li>Details on the runs are available as tooltip on result icon</li>
@@ -116,7 +117,7 @@
<div class="panel panel-primary">
<div class="panel-heading">
-<h4 class="panel-title bold">Test Function Results in Branches <small>(failures and skipped only)</small></h4>
+<h4 class="panel-title bold">Test Function Results in Branches <small>(failures, skipped or blacklisted only)</small></h4>
</div>
</div>
@@ -247,21 +248,23 @@
{% if key > buildKeyIndexPrinted and not buildKeyFound %}
{% if buildKey == run.getBuildKey %}
{# Print result #}
-{% if run.getResult == constant('TestfunctionRun::RESULT_FAILURE') %}
-{% set resultIcon = 'glyphicon glyphicon-remove red' %}
+{% if run.getResult == constant('TestfunctionRun::RESULT_SUCCESS') %}
+{% set resultIcon = 'glyphicon glyphicon-ok green' %}
+{% elseif run.getResult == constant('TestfunctionRun::RESULT_FAILURE') %}
+{% set resultIcon = 'glyphicon glyphicon-remove red' %}
{% elseif run.getResult == constant('TestfunctionRun::RESULT_FAILURE_EXPECTED') %}
-{% set resultIcon = 'glyphicon glyphicon-remove-sign green' %}
+{% set resultIcon = 'glyphicon glyphicon-remove-sign green' %}
{% elseif run.getResult == constant('TestfunctionRun::RESULT_SUCCESS_UNEXPECTED') %}
-{% set resultIcon = 'glyphicon glyphicon-ok-sign red' %}
+{% set resultIcon = 'glyphicon glyphicon-ok-sign red' %}
{% elseif run.getResult == constant('TestfunctionRun::RESULT_SKIP') %}
-{% set resultIcon = 'glyphicon glyphicon-ban-circle gray' %}
+{% set resultIcon = 'glyphicon glyphicon-ban-circle gray' %}
{% else %}
-{% set resultIcon = '' %}
+{% set resultIcon = '' %}
{% endif %}
{% if (run.getDuration / 10) > 60 %}
-{% set durationFormatted = ' (00:' ~ ((run.getDuration/10)|round)|date("i:s") ~ ')' %}
+{% set durationFormatted = ' (00:' ~ ((run.getDuration/10)|round)|date("i:s") ~ ')' %}
{% else %}
-{% set durationFormatted = '' %}
+{% set durationFormatted = '' %}
{% endif %}
{% if run.getChildren %}
{% set testrowResult = '(in test rows)' %}