Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1163)

Side by Side Diff: Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js

Issue 359533004: Group flakiness results by blink revision (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Cleanup for landing Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (C) 2011 Google Inc. All rights reserved. 1 // Copyright (C) 2011 Google Inc. All rights reserved.
2 // 2 //
3 // Redistribution and use in source and binary forms, with or without 3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are 4 // modification, are permitted provided that the following conditions are
5 // met: 5 // met:
6 // 6 //
7 // * Redistributions of source code must retain the above copyright 7 // * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer. 8 // notice, this list of conditions and the following disclaimer.
9 // * Redistributions in binary form must reproduce the above 9 // * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer 10 // copyright notice, this list of conditions and the following disclaimer
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 '<th sortValue=bugs><div class=table-header-content><span></span ><span class=header-text>bugs</span></div></th>' + 148 '<th sortValue=bugs><div class=table-header-content><span></span ><span class=header-text>bugs</span></div></th>' +
149 '<th sortValue=expectations><div class=table-header-content><spa n></span><span class=header-text>expectations</span></div></th>' + 149 '<th sortValue=expectations><div class=table-header-content><spa n></span><span class=header-text>expectations</span></div></th>' +
150 '<th sortValue=slowest><div class=table-header-content><span></s pan><span class=header-text>slowest run</span></div></th>' + 150 '<th sortValue=slowest><div class=table-header-content><span></s pan><span class=header-text>slowest run</span></div></th>' +
151 '<th sortValue=flakiness colspan=10000><div class=table-header-c ontent><span></span><span class=header-text>flakiness (numbers are runtimes in s econds)</span></div></th>' + 151 '<th sortValue=flakiness colspan=10000><div class=table-header-c ontent><span></span><span class=header-text>flakiness (numbers are runtimes in s econds)</span></div></th>' +
152 '</tr></thead>' + 152 '</tr></thead>' +
153 '<tbody><tr>' + 153 '<tbody><tr>' +
154 '<td class="test-link builder-name">WebKit Linux' + 154 '<td class="test-link builder-name">WebKit Linux' +
155 '<td class=options-container>' + 155 '<td class=options-container>' +
156 '<div><a href="http://crbug.com/1234">crbug.com/1234</a></di v>' + 156 '<div><a href="http://crbug.com/1234">crbug.com/1234</a></di v>' +
157 '<div><a href="http://webkit.org/5678">webkit.org/5678</a></ div>' + 157 '<div><a href="http://webkit.org/5678">webkit.org/5678</a></ div>' +
158 '<td class=options-container><td><td title="TEXT. Click for more info." class="results TEXT" onclick=\'showPopupForBuild(event, "WebKit Linux",0 ,"dummytest.html")\'>&nbsp;' + 158 '<td class=options-container><td>' +
159 '<td title="NO DATA. Click for more info." class="results NODATA " onclick=\'showPopupForBuild(event, "WebKit Linux",1,"dummytest.html")\'>&nbsp; ' + 159 '<td title="TEXT. Click for more info." class="results TEXT" onc lick=\'showPopupForBuild(event, "WebKit Linux",0,"dummytest.html")\'></td>' +
160 '<td title="NO DATA. Click for more info." class="results NODATA " onclick=\'showPopupForBuild(event, "WebKit Linux",1,"dummytest.html")\'>?</td> ' +
160 '</tbody>' + 161 '</tbody>' +
161 '</table>' + 162 '</table>' +
162 '<div>The following builders either don\'t run this test (e.g. it\'s ski pped) or all recorded runs passed:</div>' + 163 '<div>The following builders either don\'t run this test (e.g. it\'s ski pped) or all recorded runs passed:</div>' +
163 '<div class=skipped-builder-list>' + 164 '<div class=skipped-builder-list>' +
164 '<div class=skipped-builder>WebKit Linux (dbg)</div><div class=skipp ed-builder>WebKit Mac10.7</div><div class=skipped-builder>WebKit Win</div><div c lass=skipped-builder>WebKit Win (dbg)</div>' + 165 '<div class=skipped-builder>WebKit Linux (dbg)</div><div class=skipp ed-builder>WebKit Mac10.7</div><div class=skipped-builder>WebKit Win</div><div c lass=skipped-builder>WebKit Win (dbg)</div>' +
165 '</div>' + 166 '</div>' +
166 '<div class=expectations test=dummytest.html>' + 167 '<div class=expectations test=dummytest.html>' +
167 '<div><span class=link onclick="g_history.setQueryParameter(\'showEx pectations\', true)">Show results</span> | ' + 168 '<div><span class=link onclick="g_history.setQueryParameter(\'showEx pectations\', true)">Show results</span> | ' +
168 '<span class=link onclick="g_history.setQueryParameter(\'showLargeEx pectations\', true)">Show large thumbnails</span> | ' + 169 '<span class=link onclick="g_history.setQueryParameter(\'showLargeEx pectations\', true)">Show large thumbnails</span> | ' +
169 '<b>Only shows actual results/diffs from the most recent *failure* o n each bot.</b></div>' + 170 '<b>Only shows actual results/diffs from the most recent *failure* o n each bot.</b></div>' +
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 equal(linkifyBugs(["crbug.com/1234"]), '<div><a href="http://crbug.com/1234" >crbug.com/1234</a></div>'); 219 equal(linkifyBugs(["crbug.com/1234"]), '<div><a href="http://crbug.com/1234" >crbug.com/1234</a></div>');
219 equal(linkifyBugs(["Bug(nick)"]), '<div>Bug(nick)</div>'); 220 equal(linkifyBugs(["Bug(nick)"]), '<div>Bug(nick)</div>');
220 equal(linkifyBugs([]), ''); 221 equal(linkifyBugs([]), '');
221 }); 222 });
222 223
223 test('htmlForSingleTestRow', 1, function() { 224 test('htmlForSingleTestRow', 1, function() {
224 var historyInstance = resetGlobals(); 225 var historyInstance = resetGlobals();
225 var builder = 'dummyBuilder'; 226 var builder = 'dummyBuilder';
226 var test = createResultsObjectForTest('foo/exists.html', builder); 227 var test = createResultsObjectForTest('foo/exists.html', builder);
227 historyInstance.dashboardSpecificState.showNonFlaky = true; 228 historyInstance.dashboardSpecificState.showNonFlaky = true;
228 g_resultsByBuilder[builder] = {buildNumbers: [2, 1], blinkRevision: [1234, 1 233], failure_map: FAILURE_MAP}; 229 var blinkRevisions = [1234, 1233];
230 g_resultsByBuilder[builder] = {buildNumbers: [2, 1], blinkRevision: blinkRev isions, failure_map: FAILURE_MAP};
229 test.rawResults = [[1, 'F'], [2, 'I']]; 231 test.rawResults = [[1, 'F'], [2, 'I']];
230 test.rawTimes = [[1, 0], [2, 5]]; 232 test.rawTimes = [[1, 0], [2, 5]];
231 var expected = '<tr>' + 233 var expected = '<tr>' +
232 '<td class="test-link"><span class="link" onclick="g_history.setQueryPar ameter(\'tests\',\'foo/exists.html\');">foo/exists.html</span>' + 234 '<td class="test-link"><span class="link" onclick="g_history.setQueryPar ameter(\'tests\',\'foo/exists.html\');">foo/exists.html</span>' +
233 '<td class=options-container><a href="https://code.google.com/p/chromium /issues/entry?template=Layout%20Test%20Failure&summary=Layout%20Test%20foo%2Fexi sts.html%20is%20failing&comment=The%20following%20layout%20test%20is%20failing%2 0on%20%5Binsert%20platform%5D%0A%0Afoo%2Fexists.html%0A%0AProbable%20cause%3A%0A %0A%5Binsert%20probable%20cause%5D">File new bug</a>' + 235 '<td class=options-container><a href="https://code.google.com/p/chromium /issues/entry?template=Layout%20Test%20Failure&summary=Layout%20Test%20foo%2Fexi sts.html%20is%20failing&comment=The%20following%20layout%20test%20is%20failing%2 0on%20%5Binsert%20platform%5D%0A%0Afoo%2Fexists.html%0A%0AProbable%20cause%3A%0A %0A%5Binsert%20probable%20cause%5D">File new bug</a>' +
234 '<td class=options-container>' + 236 '<td class=options-container>' +
235 '<td>' + 237 '<td>' +
236 '<td title="TEXT. Click for more info." class="results TEXT" onclick=\'s howPopupForBuild(event, "dummyBuilder",0,"foo/exists.html")\'>&nbsp;' + 238 '<td title="TEXT. Click for more info." class="results TEXT" onclick=\'s howPopupForBuild(event, "dummyBuilder",0,"foo/exists.html")\'></td>' +
237 '<td title="IMAGE. Click for more info." class="results IMAGE" onclick=\ 'showPopupForBuild(event, "dummyBuilder",1,"foo/exists.html")\'>5'; 239 '<td title="IMAGE. Click for more info." class="results IMAGE" onclick=\ 'showPopupForBuild(event, "dummyBuilder",1,"foo/exists.html")\'>5</td>';
238 equal(htmlForSingleTestRow(test), expected); 240
241 equal(htmlForSingleTestRow(test, false, blinkRevisions), expected);
239 }); 242 });
240 243
241 test('lookupVirtualTestSuite', 2, function() { 244 test('lookupVirtualTestSuite', 2, function() {
242 equal(lookupVirtualTestSuite('fast/canvas/foo.html'), ''); 245 equal(lookupVirtualTestSuite('fast/canvas/foo.html'), '');
243 equal(lookupVirtualTestSuite('virtual/gpu/fast/canvas/foo.html'), 'virtual/g pu/fast/canvas'); 246 equal(lookupVirtualTestSuite('virtual/gpu/fast/canvas/foo.html'), 'virtual/g pu/fast/canvas');
244 }); 247 });
245 248
246 test('baseTest', 2, function() { 249 test('baseTest', 2, function() {
247 equal(baseTest('fast/canvas/foo.html', ''), 'fast/canvas/foo.html'); 250 equal(baseTest('fast/canvas/foo.html', ''), 'fast/canvas/foo.html');
248 equal(baseTest('virtual/gpu/fast/canvas/foo.html', 'virtual/gpu/fast/canvas' ), 'fast/canvas/foo.html'); 251 equal(baseTest('virtual/gpu/fast/canvas/foo.html', 'virtual/gpu/fast/canvas' ), 'fast/canvas/foo.html');
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 test.isFlaky = true; 396 test.isFlaky = true;
394 equal(shouldShowTest(test), false, 'hide flaky tests by default'); 397 equal(shouldShowTest(test), false, 'hide flaky tests by default');
395 historyInstance.dashboardSpecificState.showFlaky = true; 398 historyInstance.dashboardSpecificState.showFlaky = true;
396 equal(shouldShowTest(test), true, 'show flaky test'); 399 equal(shouldShowTest(test), true, 'show flaky test');
397 historyInstance.dashboardSpecificState.showFlaky = false; 400 historyInstance.dashboardSpecificState.showFlaky = false;
398 401
399 test = createResultsObjectForTest('foo/test.html', 'dummyBuilder'); 402 test = createResultsObjectForTest('foo/test.html', 'dummyBuilder');
400 historyInstance.crossDashboardState.testType = 'not layout tests'; 403 historyInstance.crossDashboardState.testType = 'not layout tests';
401 equal(shouldShowTest(test), true, 'show all non layout tests'); 404 equal(shouldShowTest(test), true, 'show all non layout tests');
402 }); 405 });
406
407 test('collapsedRevisionListBlink', 1, function() {
408 resetGlobals();
409 builders.loadBuildersList('@ToT Blink', 'layout-tests');
410 var test = 'dummytest.html';
411
412 var builderName1 = 'WebKit Linux 1';
413 // Note: r1235 results were generated twice by two separate builds.
414 g_resultsByBuilder[builderName1] = {buildNumbers: [2, 1, 3, 4], blinkRevisio n: [1235, 1235, 1234, 1232], failure_map: FAILURE_MAP};
415
416 var builderName2 = 'WebKit Linux 2';
417 g_resultsByBuilder[builderName2] = {buildNumbers: [4, 5], blinkRevision: [12 36, 1234], failure_map: FAILURE_MAP};
418
419 var resultsObject1 = createResultsObjectForTest(test, builderName1);
420 var resultsObject2 = createResultsObjectForTest(test, builderName2);
421
422 var result = collapsedRevisionList([resultsObject1, resultsObject2]).join(', ');
423 var expected = [1236, 1235, 1235, 1234, 1232].join(',');
424 equal(result, expected, 'collapsedRevisionList result should be the unique b link builds, sorted in descending order');
425 });
426
427 test('collapsedRevisionListChromium', 1, function() {
428 resetGlobals();
429 g_history.crossDashboardState.group = '@ToT Chromium';
430 builders.loadBuildersList('@ToT Chromium', 'unit_tests');
431 var test = 'dummytest.html';
432
433 var builderName1 = 'WebKit Linux 1';
434 // Note: r1235 results were generated twice by two separate builds.
435 g_resultsByBuilder[builderName1] = {buildNumbers: [2, 1, 3, 4], chromeRevisi on: [1235, 1235, 1234, 1232], failure_map: FAILURE_MAP};
436
437 var builderName2 = 'WebKit Linux 2';
438 g_resultsByBuilder[builderName2] = {buildNumbers: [4, 5], chromeRevision: [1 236, 1234], failure_map: FAILURE_MAP};
439
440 var resultsObject1 = createResultsObjectForTest(test, builderName1);
441 var resultsObject2 = createResultsObjectForTest(test, builderName2);
442
443 var result = collapsedRevisionList([resultsObject1, resultsObject2]).join(', ');
444 var expected = [1236, 1235, 1235, 1234, 1232].join(',');
445 equal(result, expected, 'collapsedRevisionList result should be the unique c hromium builds, sorted in descending order');
446 });
447
448 test('htmlForTestsWithMultipleRunsAtTheSameRevision', 1, function() {
449 resetGlobals();
450 builders.loadBuildersList('@ToT Blink', 'layout-tests');
451 var test = 'dummytest.html';
452
453 var builderName1 = 'WebKit Linux (dbg)';
454 // Note: r1235 results were generated thrice by three separate builds.
455 g_resultsByBuilder[builderName1] = {buildNumbers: [4, 3, 2, 1, 0], blinkRevi sion: [1235, 1235, 1235, 1234, 1233], failure_map: FAILURE_MAP};
456
457 var builderName2 = 'WebKit Win (dbg)';
458 g_resultsByBuilder[builderName2] = {buildNumbers: [6, 5], blinkRevision: [12 36, 1234], failure_map: FAILURE_MAP};
459
460 var resultsObject1 = createResultsObjectForTest(test, builderName1);
461 resultsObject1.rawResults = [[0, 'F'], [1, 'I'], [2, 'I'], [3, 'P'], [4, 'F' ]];
462 resultsObject1.rawTimes = [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0]];
463 resultsObject1.bugs = ["crbug.com/1234", "crbug.com/5678", "crbug.com/910111 2"];
464
465 var resultsObject2 = createResultsObjectForTest(test, builderName2);
466 resultsObject2.rawResults = [[4, 'F'], [5, 'I']];
467 resultsObject2.rawTimes = [[4, 0], [5, 5]];
468 resultsObject2.bugs = ["crbug.com/one", "crbug.com/two"];
469
470 g_testToResultsMap[test] = [resultsObject1, resultsObject2];
471 equal(htmlForIndividualTestOnAllBuildersWithResultsLinks(test),
472 '<table class=test-table><thead><tr>' +
473 '<th sortValue=test><div class=table-header-content><span></span ><span class=header-text>test</span></div></th>' +
474 '<th sortValue=bugs><div class=table-header-content><span></span ><span class=header-text>bugs</span></div></th>' +
475 '<th sortValue=expectations><div class=table-header-content><spa n></span><span class=header-text>expectations</span></div></th>' +
476 '<th sortValue=slowest><div class=table-header-content><span></s pan><span class=header-text>slowest run</span></div></th>' +
477 '<th sortValue=flakiness colspan=10000><div class=table-header-c ontent><span></span><span class=header-text>flakiness (numbers are runtimes in s econds)</span></div></th>' +
478 '</tr></thead>' +
479 '<tbody><tr>' +
480 '<td class="test-link builder-name">WebKit Linux (dbg)' +
481 '<td class=options-container>' +
482 '<div><a href="http://crbug.com/1234">crbug.com/1234</a></di v>' +
483 '<div><a href="http://crbug.com/5678">crbug.com/5678</a></di v>' +
484 '<div><a href="http://crbug.com/9101112">crbug.com/9101112</ a></div>' +
485 '<td class=options-container><td>' +
486 '<td title="Unknown result. Did not run tests." onclick=\'sh owPopupForInterpolatedResult(event, 1236)\' class="results interpolatedResult NO DATA" >?</td>' +
487 '<td title="TEXT. Click for more info." class="results TEXT" onclick=\'showPopupForBuild(event, "WebKit Linux (dbg)",0,"dummytest.html")\'>< /td>' +
488 '<td title="IMAGE. Click for more info." class="results IMAG E" onclick=\'showPopupForBuild(event, "WebKit Linux (dbg)",1,"dummytest.html")\' ></td>' +
489 '<td title="IMAGE. Click for more info." class="results IMAG E" onclick=\'showPopupForBuild(event, "WebKit Linux (dbg)",2,"dummytest.html")\' ></td>' +
490 '<td title="PASS. Click for more info." class="results PASS" onclick=\'showPopupForBuild(event, "WebKit Linux (dbg)",3,"dummytest.html")\'>< /td>' +
491 '<td title="PASS. Click for more info." class="results PASS" onclick=\'showPopupForBuild(event, "WebKit Linux (dbg)",4,"dummytest.html")\'>< /td>' +
492 '<tr><td class="test-link builder-name">WebKit Win (dbg)' +
493 '<td class=options-container>' +
494 '<div><a href="http://crbug.com/one">crbug.com/one</a></div> ' +
495 '<div><a href="http://crbug.com/two">crbug.com/two</a></div> ' +
496 '<td class=options-container><td>' +
497 '<td title="TEXT. Click for more info." class="results TEXT" onclick=\'showPopupForBuild(event, "WebKit Win (dbg)",0,"dummytest.html")\'></t d>' +
498 '<td title="Unknown result. Did not run tests." onclick=\'sh owPopupForInterpolatedResult(event, 1235)\' class="results interpolatedResult TE XT" >?</td>' +
499 '<td title="Unknown result. Did not run tests." onclick=\'sh owPopupForInterpolatedResult(event, 1235)\' class="results interpolatedResult TE XT" >?</td>' +
500 '<td title="Unknown result. Did not run tests." onclick=\'sh owPopupForInterpolatedResult(event, 1235)\' class="results interpolatedResult TE XT" >?</td>' +
501 '<td title="TEXT. Click for more info." class="results TEXT" onclick=\'showPopupForBuild(event, "WebKit Win (dbg)",1,"dummytest.html")\'></t d>' +
502 '<td title="Unknown result. Did not run tests." onclick=\'sh owPopupForInterpolatedResult(event, 1233)\' class="results interpolatedResult NO DATA" >?</td>' +
503 '</tbody>' +
504 '</table>' +
505 '<div>The following builders either don\'t run this test (e.g. it\'s ski pped) or all recorded runs passed:</div>' +
506 '<div class=skipped-builder-list>' +
507 '<div class=skipped-builder>WebKit Linux</div><div class=skipped-bui lder>WebKit Mac10.7</div><div class=skipped-builder>WebKit Win</div>' +
508 '</div>' +
509 '<div class=expectations test=dummytest.html>' +
510 '<div><span class=link onclick="g_history.setQueryParameter(\'showEx pectations\', true)">Show results</span> | ' +
511 '<span class=link onclick="g_history.setQueryParameter(\'showLargeEx pectations\', true)">Show large thumbnails</span> | ' +
512 '<b>Only shows actual results/diffs from the most recent *failure* o n each bot.</b></div>' +
513 '</div>');
514 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698