Make the tests page useful

This commit attempts to fix the tests page and make it useful. The
first thing it does is to remove all the bar graphs. These were added
to try and show something visual on the page. But they didn't convey
any information to the user and instead confused people.

The second thing this does is change the grouping to be more logical.
Instead of grouping on the test classes (which was also incorrect and
making assumptions about the path depth) this groups by the top level
path which will be the package the tests were in. (ie like tempest,
manila_tempest, etc) This makes more sense and also future proofs the
dashboard for when non-tempest tests are in the subunit2sql db.

The third thing this patch does is to change the default sorting order
on the tables to put the highest failure percentage at the top. This
will mean that what most people are interested in will be at the top
of the list. The fourth aspect of this patch is to default the groups
to open instead of closed.

Change-Id: I4426ba951276ef5d9482d67d5dfca7cd3d46d800
This commit is contained in:
Matthew Treinish 2015-12-22 18:11:50 -05:00
parent 0c5a9dbffd
commit 9344ace136
No known key found for this signature in database
GPG Key ID: FD12A0F214C9E177
3 changed files with 14 additions and 29 deletions

View File

@ -17,7 +17,7 @@ function TestsController(healthService, testService) {
var testsByHierarchy = _.groupBy(data.tests, function(test) {
var testId = testService.removeIdNoise(test.test_id);
var keyMatcher = /^(\w*\.\w*\.\w*)\./g;
var keyMatcher = /^(\w*)\./g;
var matches = keyMatcher.exec(testId);
if (matches) {

View File

@ -15,12 +15,7 @@
<div class="col-lg-12">
<accordion close-others="false">
<div class="panel panel-body panel-default" ng-repeat="(key, value) in tests.chartData">
<div class="panel-heading">
<h3 class="panel-title">Test failures for {{ key }}</h3>
</div>
<chart-bar data="value" width=100% height="250" show-values="false" show-x-axis="false"
force-y="[0,1]" tick-format-x="%"></chart-bar>
<accordion-group heading="Details for {{ key }}" is-open="acc1open">
<accordion-group heading="Details for {{ key }}" is-open="true">
<div>
<form>
<div class="form-group">
@ -42,7 +37,7 @@
<th sort-field="failure" class="text-right" style="min-width:80px">
Failed
</th>
<th sort-default sort-field="failureAverage" class="text-right" style="min-width:95px">
<th sort-default='reversed' sort-field="failureAverage" class="text-right" style="min-width:95px">
Failure %
</th>
<th sort-field="run_time" class="text-right" style="min-width:80px">

View File

@ -66,8 +66,8 @@ describe('TestsController', function() {
$httpBackend.flush();
var expectedChartData = {
'tempest.api.identity': [{
key: 'tempest.api.identity',
'tempest': [{
key: 'tempest',
values: [{
label: 'tempest.api.identity.admin.v2.test_users.one',
value: 0.1
@ -80,12 +80,15 @@ describe('TestsController', function() {
success: 55920,
test_id: 'tempest.api.identity.admin.v2.test_users.one',
failureAverage: 0.1
}]
}],
'tempest.api.volume': [{
key: 'tempest.api.volume',
values: [],
tests: [{
}, {
failure: 1,
id: '002a15e0-f6d1-472a-bd66-bb13ac4d77aa',
run_count: 32292,
run_time: 1.18864,
success: 32291,
test_id: 'tempest.api.network.test_routers.three',
failureAverage: 0.0000309674222717701
}, {
failure: 0,
id: '001c6860-c966-4c0b-9928-ecccd162bed0',
run_count: 4939,
@ -94,19 +97,6 @@ describe('TestsController', function() {
test_id: 'tempest.api.volume.admin.test_snapshots_actions.two',
failureAverage: 0
}]
}],
'tempest.api.network': [{
key: 'tempest.api.network',
values: [],
tests: [{
failure: 1,
id: '002a15e0-f6d1-472a-bd66-bb13ac4d77aa',
run_count: 32292,
run_time: 1.18864,
success: 32291,
test_id: 'tempest.api.network.test_routers.three',
failureAverage: 0.0000309674222717701
}]
}]
};
expect(testsController.chartData).toEqual(expectedChartData);