summaryrefslogtreecommitdiffstats
path: root/non-puppet/qtmetrics2/templates
diff options
context:
space:
mode:
authorJuha Sippola <juhasippola@outlook.com>2015-09-23 12:23:59 +0300
committerTony Sarajärvi <tony.sarajarvi@theqtcompany.com>2015-09-23 09:40:41 +0000
commit7054f29267bb4f3dec16b60217bbf28d61435aaa (patch)
treea8649b2e7a7933a9891ec1abacd67923b495b5c7 /non-puppet/qtmetrics2/templates
parent1f60410f51f86287ebe9c8694d92df139e830b6f (diff)
Qt Metrics 2 (v0.34): Bpassed test rows for testset
New page to list blacklisted passed test rows since a specific date for one testset. This can be opened from the testset page via a button. Change-Id: I82acf6d03ad860f61360f8ede18787cfd9eb44aa 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/testfunction.html11
-rw-r--r--non-puppet/qtmetrics2/templates/testfunctions_bpass.html7
-rw-r--r--non-puppet/qtmetrics2/templates/testfunctions_bpass_data.html138
-rw-r--r--non-puppet/qtmetrics2/templates/testrows_bpass.html111
-rw-r--r--non-puppet/qtmetrics2/templates/testset.html8
6 files changed, 212 insertions, 67 deletions
diff --git a/non-puppet/qtmetrics2/templates/about.html b/non-puppet/qtmetrics2/templates/about.html
index d1d72d5..044d95a 100644
--- a/non-puppet/qtmetrics2/templates/about.html
+++ b/non-puppet/qtmetrics2/templates/about.html
@@ -34,7 +34,7 @@
/**
* About window content
- * @since 22-09-2015
+ * @since 23-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.33 (22-Sep-2015)</small></p>
+<p><small>Version 0.34 (23-Sep-2015)</small></p>
diff --git a/non-puppet/qtmetrics2/templates/testfunction.html b/non-puppet/qtmetrics2/templates/testfunction.html
index 26017db..14d285b 100644
--- a/non-puppet/qtmetrics2/templates/testfunction.html
+++ b/non-puppet/qtmetrics2/templates/testfunction.html
@@ -34,7 +34,7 @@
/**
* Test function page (list of test rows)
- * @since 17-09-2015
+ * @since 23-09-2015
* @author Juha Sippola
*/
@@ -95,7 +95,8 @@
<li>results: <span class="glyphicon glyphicon-remove red"></span> = {{ constant('TestrowRun::RESULT_FAILURE') }},
<span class="glyphicon glyphicon-ok-sign red"></span> = {{ constant('TestrowRun::RESULT_SUCCESS_UNEXPECTED') }},
<span class="glyphicon glyphicon-remove-sign green"></span> = {{ constant('TestrowRun::RESULT_FAILURE_EXPECTED') }},
-<span class="glyphicon glyphicon-ban-circle gray"></span> = {{ constant('TestrowRun::RESULT_SKIP') }}</li>
+<span class="glyphicon glyphicon-ban-circle gray"></span> = {{ constant('TestrowRun::RESULT_SKIP') }},
+<span class="glyphicon glyphicon-ok green"></span> = {{ constant('TestrowRun::RESULT_SUCCESS') }} (blacklisted only)</li>
</ul>
</li>
<li>Details on the runs are available as tooltip on result icon</li>
@@ -109,7 +110,7 @@
<div class="panel panel-primary">
<div class="panel-heading">
-<h4 class="panel-title bold">Test Row Results in Branches <small>(failures and skipped only)</small></h4>
+<h4 class="panel-title bold">Test Row Results in Branches <small>(failures, skipped or blacklisted only)</small></h4>
</div>
</div>
@@ -233,7 +234,9 @@
{% if key > buildKeyIndexPrinted and not buildKeyFound %}
{% if buildKey == run.getBuildKey %}
{# Print result #}
-{% if run.getResult == constant('TestfunctionRun::RESULT_FAILURE') %}
+{% 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' %}
diff --git a/non-puppet/qtmetrics2/templates/testfunctions_bpass.html b/non-puppet/qtmetrics2/templates/testfunctions_bpass.html
index 91ed345..37f665c 100644
--- a/non-puppet/qtmetrics2/templates/testfunctions_bpass.html
+++ b/non-puppet/qtmetrics2/templates/testfunctions_bpass.html
@@ -34,7 +34,7 @@
/**
* Blacklisted passes (testfunctions) page
- * @since 22-09-2015
+ * @since 23-09-2015
* @author Juha Sippola
*/
@@ -59,7 +59,7 @@
<h1 class="page-header">
<span id="testset">{{ testset }}</span>
<span id="project" class="hidden">{{ project }}</span>
-Test Function Blacklisted Passes
+Blacklisted Test Function 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>
@@ -100,6 +100,9 @@ and configuration. The testset link opens a page where the test functions are li
<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 class="alert alert-info" role="alert">
+<span class="glyphicon glyphicon-info-sign"></span> <strong>Tip:</strong> You can quickly check both the blacklisted test function passes and test row passes under each testset.
+</div>
{% endif %}
</div> {# testfunctions_blacklisted_passed_data #}
diff --git a/non-puppet/qtmetrics2/templates/testfunctions_bpass_data.html b/non-puppet/qtmetrics2/templates/testfunctions_bpass_data.html
index 7fd55d7..3fb0123 100644
--- a/non-puppet/qtmetrics2/templates/testfunctions_bpass_data.html
+++ b/non-puppet/qtmetrics2/templates/testfunctions_bpass_data.html
@@ -33,8 +33,8 @@
#############################################################################
/**
- * Blacklisted passes (testfunctions) data
- * @since 22-09-2015
+ * Blacklisted passes (testfunctions or testrows) data
+ * @since 23-09-2015
* @author Juha Sippola
*/
@@ -43,36 +43,41 @@
{# Failed/passed bar area size in px #}
{% set BAR_AREA = 120 %}
-{# testfunctions as Testfunction objects
+{# tests as Testfunction objects
/**
- * @var Testfunction[] testfunctions
+ * @var Testfunction[] tests
+ */
+#}
+{# tests as Testrow objects
+/**
+ * @var Testrow[] tests
*/
#}
{# Calculate max result count for the bar #}
{% set prevTestsetName = '' %}
{% set prevProjectName = '' %}
-{% set testfunctionCount = 0 %}
+{% set testCount = 0 %}
{% set maxCount = 1 %}
-{% for testfunction in testfunctions %}
-{% if (testfunction.getTestsetName == prevTestsetName) and (testfunction.getTestsetProjectName == prevProjectName) %}
-{% set testfunctionCount = testfunctionCount + 1 %}
+{% for test in tests %}
+{% if (test.getTestsetName == prevTestsetName) and (test.getTestsetProjectName == prevProjectName) %}
+{% set testCount = testCount + 1 %}
{% else %}
-{% if testfunctionCount > maxCount %}
-{% set maxCount = testfunctionCount %}
+{% if testCount > maxCount %}
+{% set maxCount = testCount %}
{% endif %}
-{% set testfunctionCount = 1 %}
+{% set testCount = 1 %}
{% endif %}
-{% set prevTestsetName = testfunction.getTestsetName %}
-{% set prevProjectName = testfunction.getTestsetProjectName %}
+{% set prevTestsetName = test.getTestsetName %}
+{% set prevProjectName = test.getTestsetProjectName %}
{% endfor %}
-{% if testfunctionCount > maxCount %}
-{% set maxCount = testfunctionCount %}
+{% if testCount > maxCount %}
+{% set maxCount = testCount %}
{% endif %}
{##### Summary #####}
-{% if testfunctionCount > 0 %}
+{% if testCount > 0 %}
<div class="panel panel-primary">
<div class="panel-heading">
@@ -94,28 +99,28 @@
{# Print testsets #}
{% set prevTestsetName = '' %}
{% set prevProjectName = '' %}
-{% set testfunctionCount = 0 %}
+{% set testCount = 0 %}
{% set bar = 0 %}
-{% for testfunction in testfunctions %}
+{% for test in tests %}
{# First row #}
{% if prevTestsetName == '' %}
<tr>
-<td>{{ testfunction.getTestsetName }}</td>
-<td>{{ testfunction.getTestsetProjectName }}</td>
-{% set testfunctionCount = 1 %}
+<td>{{ test.getTestsetName }}</td>
+<td>{{ test.getTestsetProjectName }}</td>
+{% set testCount = 1 %}
{# Same testset: Increase the counter #}
-{% elseif (testfunction.getTestsetName == prevTestsetName) and (testfunction.getTestsetProjectName == prevProjectName) %}
-{% set testfunctionCount = testfunctionCount + 1 %}
+{% elseif (test.getTestsetName == prevTestsetName) and (test.getTestsetProjectName == prevProjectName) %}
+{% set testCount = testCount + 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 = ((BAR_AREA/maxCount) * testCount)|round(0, 'floor') %}
+{% if (testCount > 0) and (bar == 0) %}
{% set bar = 1 %}
{% endif %}
-<td class="leftBorder center">{{ testfunctionCount }}</td>
+<td class="leftBorder center">{{ testCount }}</td>
<td class="center showInLargeDisplay">
<div>
<div class="floatLeft blueBackground" style="width: {{ bar }}px">&nbsp;</div>
@@ -123,21 +128,21 @@
</td>
</tr>
<tr>
-<td>{{ testfunction.getTestsetName }}</td>
-<td>{{ testfunction.getTestsetProjectName }}</td>
-{% set testfunctionCount = 1 %}
+<td>{{ test.getTestsetName }}</td>
+<td>{{ test.getTestsetProjectName }}</td>
+{% set testCount = 1 %}
{% endif %}
-{% set prevTestsetName = testfunction.getTestsetName %}
-{% set prevProjectName = testfunction.getTestsetProjectName %}
-{% endfor %}{# testfunction #}
+{% set prevTestsetName = test.getTestsetName %}
+{% set prevProjectName = test.getTestsetProjectName %}
+{% endfor %}{# test #}
{# Print count for last one #}
-{% if testfunctionCount > 0 %}
-{% set bar = ((BAR_AREA/maxCount) * testfunctionCount)|round(0, 'floor') %}
-{% if (testfunctionCount > 0) and (bar == 0) %}
+{% if testCount > 0 %}
+{% set bar = ((BAR_AREA/maxCount) * testCount)|round(0, 'floor') %}
+{% if (testCount > 0) and (bar == 0) %}
{% set bar = 1 %}
{% endif %}
-<td class="leftBorder center">{{ testfunctionCount }}</td>
+<td class="leftBorder center">{{ testCount }}</td>
<td class="center showInLargeDisplay">
<div>
<div class="floatLeft blueBackground" style="width: {{ bar }}px">&nbsp;</div>
@@ -152,7 +157,7 @@
</div> {# .panel-body #}
</div> {# .panel... #}
-{% endif %}{# testfunctionCount #}
+{% endif %}{# testCount #}
{##### List #####}
@@ -161,13 +166,16 @@
<h4 class="panel-title bold">Blacklisted Passes <small>(last {{ lastDays }} days since {{ sinceDate }})</small></h4>
</div>
-{% if testfunctionCount > 0 %}
+{% if testCount > 0 %}
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
+{% if list == 'rows' %}
+<th>test row</th>
+{% endif %}
<th>test function</th>
<th>testset</th>
<th class="showInLargeDisplay">project</th>
@@ -176,40 +184,56 @@
</thead>
<tbody>
-{# Print testfunctions #}
-{% for testfunction in testfunctions %}
+{# Print tests #}
+{% for test in tests %}
<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 %}
+{# Name #}
+{% if test.getName|length > constant('Testfunction::SHORT_NAME_LENGTH') %}
+<td><span class="clickOnTouch" data-toggle="tooltip" data-placement="top" title="{{ test.getName }}">{{ test.getShortName }}</span></td>
+{% else %}
+<td>{{ test.getName }}</td>
+{% endif %}
+
+{# Testfunction name for a testrow (with a link to testfunction page) #}
+{% if list == 'rows' %}
+{% set link = testfunctionRoute ~ '/' ~ test.getTestfunctionName|url_encode ~ '/' ~ test.getTestsetName|url_encode ~ '/' ~ test.getTestsetProjectName|url_encode ~ '/' ~ test.getConfName|url_encode %}
+<td><a href="{{ link }}">
+{% if test.getTestfunctionName|length > constant('Testfunction::SHORT_NAME_LENGTH') %}
+<span class="clickOnTouch" data-toggle="tooltip" data-placement="top" title="{{ test.getTestfunctionName }}">{{ test.getTestfunctionShortName }}</span>
+{% else %}
+{{ test.getTestfunctionName }}
+{% endif %}
+</a></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>
+{# Testset name (with a link to testset page for testfunctions list) #}
+{% if list == 'functions' %}
+{% set link = testsetRoute ~ '/' ~ test.getTestsetName|url_encode ~ '/' ~ test.getTestsetProjectName|url_encode ~ '/' ~ test.getConfName|url_encode %}
+<td><a href="{{ link }}">{{ test.getTestsetName }}</a></td>
+{% else %}
+<td>{{ test.getTestsetName }}</td>
+{% endif %}
{# Project name #}
-<td class="showInLargeDisplay">{{ testfunction.getTestsetProjectName }}</td>
+<td class="showInLargeDisplay">{{ test.getTestsetProjectName }}</td>
{# Conf name #}
-<td class="showInLargeDisplay">{{ testfunction.getConfName }}</td>
+<td class="showInLargeDisplay">{{ test.getConfName }}</td>
</tr>
-{% endfor %}{# testfunction #}
+{% endfor %}{# test #}
</tbody>
</table>
</div> {# .table-responsive #}
</div> {# .panel-body #}
-{% endif %}{# testfunctionCount #}
+{% endif %}{# testCount #}
</div> {# .panel... #}
-{% if testfunctionCount == 0 %}
+{% if testCount == 0 %}
<div class="alert alert-info" role="alert">
-The testset {{ testset }} ({{ project }}) either does not have any blacklisted test functions,
-or there are failed or skipped blacklisted test functions since {{ sinceDate }}!
+The testset {{ testset }} ({{ project }}) either does not have any blacklisted test {{ list }},
+or there are failed or skipped blacklisted test {{ list }} since {{ sinceDate }}!
</div>
-{% endif %}{# testfunctionCount #}
+{% endif %}{# testCount #}
diff --git a/non-puppet/qtmetrics2/templates/testrows_bpass.html b/non-puppet/qtmetrics2/templates/testrows_bpass.html
new file mode 100644
index 0000000..7dede8a
--- /dev/null
+++ b/non-puppet/qtmetrics2/templates/testrows_bpass.html
@@ -0,0 +1,111 @@
+{#
+#############################################################################
+##
+## 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 (testrows) page
+ * @since 23-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 row passes</li>
+</ol>
+
+<div class="container-fluid">
+<div class="row">
+
+<div class="col-sm-12 col-md-12 main">
+
+{##### Title #####}
+
+<h1 class="page-header">
+<span id="testset">{{ testset }}</span>
+<span id="project" class="hidden">{{ project }}</span>
+Blacklisted Test Row 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 Row Blacklisted Passes</strong><br>
+<ul>
+<li>Lists the test rows 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 row would be
+tested normally in the future builds.</li>
+<li><strong>Summary</strong> shows the count of test rows in each testset (any configuration or branch)
+with blacklisted passes</li>
+<li><strong>Blacklisted Passes</strong> shows the list of test rows with blacklisted passes by testset
+and configuration. The testset link opens a page where the test rows are listed by branch.</li>
+</ul>
+</div>
+</div>
+
+{##### List #####}
+
+<div id="testrows_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> {# testrows_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/testset.html b/non-puppet/qtmetrics2/templates/testset.html
index 817e783..9fd4900 100644
--- a/non-puppet/qtmetrics2/templates/testset.html
+++ b/non-puppet/qtmetrics2/templates/testset.html
@@ -34,7 +34,7 @@
/**
* Testset page (list of configurations)
- * @since 22-09-2015
+ * @since 23-09-2015
* @author Juha Sippola
*/
@@ -124,7 +124,11 @@ and their configuration on <strong>{{ masterProject }} {{ masterState }}</strong
<div>
<div class="btn-group">
{% set link = bpassedTestsetRoute ~ '/' ~ testset.getName|url_encode ~ '/' ~ testset.getProjectName|url_encode %}
-<a class="btn btn-primary btn-xs" href="{{ link }}" role="button">test function blacklisted passes</a>
+<a class="btn btn-primary btn-xs" href="{{ link }}" role="button">blacklisted passes for<br>test functions</a>
+</div>
+<div class="btn-group">
+{% set link = bpassedtestsetTestrowsRoute ~ '/' ~ testset.getName|url_encode ~ '/' ~ testset.getProjectName|url_encode %}
+<a class="btn btn-primary btn-xs" href="{{ link }}" role="button">blacklisted passes for<br>test rows</a>
</div>
</div>
<hr>