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:
parent
0c5a9dbffd
commit
9344ace136
|
@ -17,7 +17,7 @@ function TestsController(healthService, testService) {
|
||||||
|
|
||||||
var testsByHierarchy = _.groupBy(data.tests, function(test) {
|
var testsByHierarchy = _.groupBy(data.tests, function(test) {
|
||||||
var testId = testService.removeIdNoise(test.test_id);
|
var testId = testService.removeIdNoise(test.test_id);
|
||||||
var keyMatcher = /^(\w*\.\w*\.\w*)\./g;
|
var keyMatcher = /^(\w*)\./g;
|
||||||
var matches = keyMatcher.exec(testId);
|
var matches = keyMatcher.exec(testId);
|
||||||
|
|
||||||
if (matches) {
|
if (matches) {
|
||||||
|
|
|
@ -15,12 +15,7 @@
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<accordion close-others="false">
|
<accordion close-others="false">
|
||||||
<div class="panel panel-body panel-default" ng-repeat="(key, value) in tests.chartData">
|
<div class="panel panel-body panel-default" ng-repeat="(key, value) in tests.chartData">
|
||||||
<div class="panel-heading">
|
<accordion-group heading="Details for {{ key }}" is-open="true">
|
||||||
<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">
|
|
||||||
<div>
|
<div>
|
||||||
<form>
|
<form>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -42,7 +37,7 @@
|
||||||
<th sort-field="failure" class="text-right" style="min-width:80px">
|
<th sort-field="failure" class="text-right" style="min-width:80px">
|
||||||
Failed
|
Failed
|
||||||
</th>
|
</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 %
|
Failure %
|
||||||
</th>
|
</th>
|
||||||
<th sort-field="run_time" class="text-right" style="min-width:80px">
|
<th sort-field="run_time" class="text-right" style="min-width:80px">
|
||||||
|
|
|
@ -66,8 +66,8 @@ describe('TestsController', function() {
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
|
||||||
var expectedChartData = {
|
var expectedChartData = {
|
||||||
'tempest.api.identity': [{
|
'tempest': [{
|
||||||
key: 'tempest.api.identity',
|
key: 'tempest',
|
||||||
values: [{
|
values: [{
|
||||||
label: 'tempest.api.identity.admin.v2.test_users.one',
|
label: 'tempest.api.identity.admin.v2.test_users.one',
|
||||||
value: 0.1
|
value: 0.1
|
||||||
|
@ -80,12 +80,15 @@ describe('TestsController', function() {
|
||||||
success: 55920,
|
success: 55920,
|
||||||
test_id: 'tempest.api.identity.admin.v2.test_users.one',
|
test_id: 'tempest.api.identity.admin.v2.test_users.one',
|
||||||
failureAverage: 0.1
|
failureAverage: 0.1
|
||||||
}]
|
}, {
|
||||||
}],
|
failure: 1,
|
||||||
'tempest.api.volume': [{
|
id: '002a15e0-f6d1-472a-bd66-bb13ac4d77aa',
|
||||||
key: 'tempest.api.volume',
|
run_count: 32292,
|
||||||
values: [],
|
run_time: 1.18864,
|
||||||
tests: [{
|
success: 32291,
|
||||||
|
test_id: 'tempest.api.network.test_routers.three',
|
||||||
|
failureAverage: 0.0000309674222717701
|
||||||
|
}, {
|
||||||
failure: 0,
|
failure: 0,
|
||||||
id: '001c6860-c966-4c0b-9928-ecccd162bed0',
|
id: '001c6860-c966-4c0b-9928-ecccd162bed0',
|
||||||
run_count: 4939,
|
run_count: 4939,
|
||||||
|
@ -94,19 +97,6 @@ describe('TestsController', function() {
|
||||||
test_id: 'tempest.api.volume.admin.test_snapshots_actions.two',
|
test_id: 'tempest.api.volume.admin.test_snapshots_actions.two',
|
||||||
failureAverage: 0
|
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);
|
expect(testsController.chartData).toEqual(expectedChartData);
|
||||||
|
|
Loading…
Reference in New Issue