diff options
author | Juha Sippola <juhasippola@outlook.com> | 2015-09-21 16:40:16 +0300 |
---|---|---|
committer | Tony Sarajärvi <tony.sarajarvi@theqtcompany.com> | 2015-09-23 09:39:50 +0000 |
commit | 18a1f4f3e92986a0b29577f5c34a4507e690bce3 (patch) | |
tree | 8e7ce89a40f82b60b58ac93b76f748a1d3338014 /non-puppet/qtmetrics2/templates | |
parent | 5943fba9d274c49e00a6f956536841a99f247e2d (diff) |
Qt Metrics 2 (v0.30): Top test function failures
New page to list top failed testfunctions since a
specific date.
The date scope can be configured in the ini file.
The query duration is about 30 seconds with the
scope of last seven days.
Change-Id: I7b718f8df63efd31a62edff02a15f32e64279efc
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
Diffstat (limited to 'non-puppet/qtmetrics2/templates')
-rw-r--r-- | non-puppet/qtmetrics2/templates/about.html | 4 | ||||
-rw-r--r-- | non-puppet/qtmetrics2/templates/home.html | 9 | ||||
-rw-r--r-- | non-puppet/qtmetrics2/templates/testfunctions_top.html | 106 | ||||
-rw-r--r-- | non-puppet/qtmetrics2/templates/testfunctions_top_data.html | 130 |
4 files changed, 243 insertions, 6 deletions
diff --git a/non-puppet/qtmetrics2/templates/about.html b/non-puppet/qtmetrics2/templates/about.html index 67549d8..bef8584 100644 --- a/non-puppet/qtmetrics2/templates/about.html +++ b/non-puppet/qtmetrics2/templates/about.html @@ -34,7 +34,7 @@ /** * About window content - * @since 17-09-2015 + * @since 20-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.29 (17-Sep-2015)</small></p> +<p><small>Version 0.30 (20-Sep-2015)</small></p> diff --git a/non-puppet/qtmetrics2/templates/home.html b/non-puppet/qtmetrics2/templates/home.html index 00e3828..24119e0 100644 --- a/non-puppet/qtmetrics2/templates/home.html +++ b/non-puppet/qtmetrics2/templates/home.html @@ -34,7 +34,7 @@ /** * Home page - * @since 03-08-2015 + * @since 18-09-2015 * @author Juha Sippola */ @@ -127,10 +127,11 @@ </form> </div> <br> -<p>See testset lists:</p> +<p>See top failure/flaky lists:</p> <div> -<a class="btn btn-primary btn-xs" href="{{ topRoute }}" role="button">top failures</a> -<a class="btn btn-primary btn-xs" href="{{ flakyRoute }}" role="button">flaky testsets</a> +<a class="btn btn-primary btn-xs" href="{{ topRoute }}" role="button">testsets</a> +<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> </div> {# .col-md... #} diff --git a/non-puppet/qtmetrics2/templates/testfunctions_top.html b/non-puppet/qtmetrics2/templates/testfunctions_top.html new file mode 100644 index 0000000..f82d3a6 --- /dev/null +++ b/non-puppet/qtmetrics2/templates/testfunctions_top.html @@ -0,0 +1,106 @@ +{# +############################################################################# +## +## 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$ +## +############################################################################# + +/** + * Top failures (testfunctions) page + * @since 18-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">top test function failures</li> +</ol> + +<div class="container-fluid"> +<div class="row"> + +<div class="col-sm-12 col-md-12 main"> + +{##### Title #####} + +<h1 class="page-header"> +Top {{ topN }} Test Function Failures +<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>Top Test Function Failures</strong><br> +<ul> +<li>Lists test functions by number of <strong>{{ masterProject }} {{ masterState }}</strong> +builds where it failed during the last {{ lastDays }} days.</li> +</ul> +</div> +</div> + +{##### Top list #####} + +<div id="testfunctions_top_data"> +<div class="panel panel-primary"> +<div class="panel-heading"> +<h4 class="panel-title bold">Last {{ lastDays }} days <small>(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_top_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_top_data.html b/non-puppet/qtmetrics2/templates/testfunctions_top_data.html new file mode 100644 index 0000000..647c4ab --- /dev/null +++ b/non-puppet/qtmetrics2/templates/testfunctions_top_data.html @@ -0,0 +1,130 @@ +{# +############################################################################# +## +## 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$ +## +############################################################################# + +/** + * Top failures (testfunctions) data + * @since 20-09-2015 + * @author Juha Sippola + */ + +#} + +{# Failed/passed bar area size in px #} +{% set BAR_AREA = 120 %} + +{# testfunctions as Testfunction objects +/** + * @var Testfunction[] testfunctions + */ +#} + +{##### Top list #####} + +<div class="panel panel-primary"> +<div class="panel-heading"> +<h4 class="panel-title bold">Last {{ lastDays }} days <small>(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="leftBorder center">fail <span class ="gray">(total)</span></th> +<th class="showInLargeDisplay"><small> +<span class="redBackground paddingHorizontal">fail</span><span class="greenBackground paddingHorizontal">pass</span><span class="grayBackground paddingHorizontal">skip</span> +</small></th> +</tr> +</thead> +<tbody> +{# Calculate max result count for the bar #} +{% set maxCount = 1 %} +{% for testfunction in testfunctions %} +{% if (testfunction.getResultCounts.passed + testfunction.getResultCounts.failed + testfunction.getResultCounts.skipped) > maxCount %} +{% set maxCount = testfunction.getResultCounts.passed + testfunction.getResultCounts.failed + testfunction.getResultCounts.skipped %} +{% endif %} +{% endfor %} + +{# 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 #} +<td><a href="{{ testsetRoute }}/{{ testfunction.getTestsetName|url_encode }}/{{ testfunction.getTestsetProjectName|url_encode }}">{{ testfunction.getTestsetName }}</a></td> + +{# Project name #} +<td class="showInLargeDisplay">{{ testfunction.getTestsetProjectName }}</td> + +{# Show results as numbers #} +{% set failed = testfunction.getResultCounts.failed %} +{% set passed = testfunction.getResultCounts.passed %} +{% set skipped = testfunction.getResultCounts.skipped %} +{% set total = passed + failed + skipped %} +<td class="leftBorder center">{{ failed }}<span class ="gray"> ({{ total }})</span></td> + +{# Show results as bars (scaled to BAR_AREA px) #} +{% set passedBar = ((BAR_AREA/maxCount) * passed)|round(0, 'floor') %} +{% if (passed > 0) and (passedBar == 0) %} +{% set passedBar = 1 %} +{% endif %} +{% set failedBar = ((BAR_AREA/maxCount)*failed)|round(0, 'floor') %} +{% if (failed > 0) and (failedBar == 0) %} +{% set failedBar = 1 %} +{% endif %} +{% set skippedBar = ((BAR_AREA/maxCount) * skipped)|round(0, 'floor') %} +{% if (skipped > 0) and (skippedBar == 0) %} +{% set skippedBar = 1 %} +{% endif %} +<td class="center showInLargeDisplay"> +<div> +<div class="floatLeft redBackground" style="width: {{ failedBar }}px"> </div> +<div class="floatLeft greenBackground" style="width: {{ passedBar }}px"> </div> +<div class="floatLeft grayBackground" style="width: {{ skippedBar }}px"> </div> +</div> +</td> +</tr> +{% endfor %}{# testfunction #} +</tbody> +</table> +</div> {# .table-responsive #} +</div> {# .panel-body #} +</div> {# .panel... #} |