From 7255c26568e848026a6535331b0cb70d356411f1 Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Fri, 28 Dec 2018 13:46:53 +0100 Subject: [PATCH] Better formated test result output --- test/Calibre-Web TestSummary.html | 2231 ++--------------------------- test/js/runner.js | 58 +- 2 files changed, 124 insertions(+), 2165 deletions(-) diff --git a/test/Calibre-Web TestSummary.html b/test/Calibre-Web TestSummary.html index 192ad212..358b7b0e 100644 --- a/test/Calibre-Web TestSummary.html +++ b/test/Calibre-Web TestSummary.html @@ -1,6 +1,4 @@ - - @@ -32,15 +30,15 @@
-

Start Time: 2018-12-23 15:44:21.732315

+

Start Time: 2018-12-28 13:43:29.420375

-

Stop Time: 2018-12-23 16:05:34.967181

+

Stop Time: 2018-12-28 13:43:30.101176

-

Duration: 0:21:13.234866

+

Duration: 0:00:00.680801

@@ -61,11 +59,17 @@ + + - - -
-
ft1.6: Traceback (most recent call last):
-  File "/home/matthias/Entwicklung/calibre-web-test/test/test_shelf.py", line 310, in test_shelf_database_change
-    self.assertIsNone('Not Implemented', 'Database change')
-AssertionError: Database change
-
-
- - - - - - -
test_shelf_long_name
- - PASS - - - test_logging.test_logging - 4 - 3 - 1 - 0 - 0 - - Detail - - - - -
test_debug_log
- - PASS - - - -
test_failed_login
- - PASS - - - -
test_logfile_change
- - PASS - - - -
test_logfile_recover
- - -
- FAIL -
- - - - - - - test_visiblilitys.calibre_web_visibilitys - 17 - 17 - 0 - 0 - 0 - - Detail - - - - -
test_about
- - PASS - - - -
test_admin_SMTP_Settings
- - PASS - - - -
test_admin_add_user
- - PASS - - - -
test_admin_change_password
- - PASS - - - -
test_admin_change_visibility_authors
- - PASS - - - -
test_admin_change_visibility_category
- - PASS - - - -
test_admin_change_visibility_hot
- - PASS - - - -
test_admin_change_visibility_language
- - PASS - - - -
test_admin_change_visibility_publisher
- - PASS - - - -
test_admin_change_visibility_rated
- - PASS - - - -
test_admin_change_visibility_read
- - PASS - - - -
test_admin_change_visibility_series
- - PASS - - - -
test_admin_change_visibility_sorted
- - PASS - - - -
test_checked_logged_in
- - PASS - - - -
test_random_books_available
- - PASS - - - -
test_user_email_available
- - PASS - - - -
test_user_visibility_sidebar
- - PASS - - - test_user_template.test_user_template - 15 - 12 - 0 - 0 - 3 - - Detail - - - - -
test_author_user_template
- - PASS - - - -
test_best_user_template
- - PASS - - - -
test_category_user_template
- - PASS - - - -
test_detail_random_user_template
- - PASS - - - -
test_hot_user_template
- - PASS - - - -
test_language_user_template
- - PASS - - - -
test_limit_book_languages
- - -
- SKIP -
- - - - - - - -
test_mature_content_settings
- - -
- SKIP -
- - - - - - - -
test_publisher_user_template
- - PASS - - - -
test_random_user_template
- - PASS - - - -
test_read_user_template
- - PASS - - - -
test_recent_user_template
- - PASS - - - -
test_series_user_template
- - PASS - - - -
test_sorted_user_template
- - PASS - - - -
test_ui_language_settings
- - -
- SKIP -
- - - - - - - test_anonymous.test_anonymous - 1 - 0 - 0 - 0 - 1 - - Detail - - - - -
test_anonymous_user
- - -
- SKIP -
- - - - - - - test_edit_books.test_edit_books - 22 - 3 - 2 - 0 - 17 - - Detail - - - - -
test_database_errors
- - -
- SKIP -
- - - - - - - -
test_delete_book
- - -
- SKIP -
- - - - - - - -
test_delete_format
- - -
- SKIP -
- - - - - - - -
test_edit_author
- - -
- FAIL -
- - - - - - - -
test_edit_category
- - PASS - - - -
test_edit_comments
- - -
- SKIP -
- - - - - - - -
test_edit_custom_bool
- - -
- SKIP -
- - - - - - - -
test_edit_custom_rating
- - -
- SKIP -
- - - - - - - -
test_edit_custom_single_select
- - -
- SKIP -
- - - - - - - -
test_edit_custom_text
- - -
- SKIP -
- - - - - - - -
test_edit_language
- - -
- SKIP -
- - - - - - - -
test_edit_publisher
- - PASS - - - -
test_edit_publishing_date
- - -
- SKIP -
- - - - - - - -
test_edit_rating
- - -
- SKIP -
- - - - - - - -
test_edit_series
- - PASS - - - -
test_edit_title
- - -
- FAIL -
- - - - - - - -
test_typeahead_author
- - -
- SKIP -
- - - - - - - -
test_typeahead_language
- - -
- SKIP -
- - - - - - - -
test_typeahead_publisher
- - -
- SKIP -
- - - - - - - -
test_typeahead_series
- - -
- SKIP -
- - - - - - - -
test_typeahead_tag
- - -
- SKIP -
- - - - - - - -
test_upload_cover_hdd
- - -
- SKIP -
- - - - - - - test_edit_books_gdrive.test_edit_books_gdrive - 22 - 0 - 0 - 0 - 22 - - Detail - - - - -
test_database_errors
- - -
- SKIP -
- - - - - - - -
test_delete_book
- - -
- SKIP -
- - - - - - - -
test_delete_format
- - -
- SKIP -
- - - - - - - -
test_edit_author
- - -
- SKIP -
- - - - - - - -
test_edit_category
- - -
- SKIP -
- - - - - - - -
test_edit_comments
- - -
- SKIP -
- - - - - - - -
test_edit_custom_bool
- - -
- SKIP -
- - - - - - - -
test_edit_custom_rating
- - -
- SKIP -
- - - - - - - -
test_edit_custom_single_select
- - -
- SKIP -
- - - - - - - -
test_edit_custom_text
- - -
- SKIP -
- - - - - - - -
test_edit_language
- - -
- SKIP -
- - - - - - - -
test_edit_publisher
- - -
- SKIP -
- - - - - - - -
test_edit_publishing_date
- - -
- SKIP -
- - - - - - - -
test_edit_rating
- - -
- SKIP -
- - - - - - - -
test_edit_series
- - -
- SKIP -
- - - - - - - -
test_edit_title
- - -
- SKIP -
- - - - - - - -
test_typeahead_author
- - -
- SKIP -
- - - - - - - -
test_typeahead_language
- - -
- SKIP -
- - - - - - - -
test_typeahead_publisher
- - -
- SKIP -
- - - - - - - -
test_typeahead_series
- - -
- SKIP -
- - - - - - - -
test_typeahead_tag
- - -
- SKIP -
- - - - - - - -
test_upload_cover_hdd
- - -
- SKIP -
- - - - - - - test_ebook_convert.test_ebook_convert - 11 - 7 - 0 - 0 - 4 - - Detail - - - - -
test_SSL_smtp_setup_error
- - -
- PASS -
- - - - - - - -
test_STARTTLS_smtp_setup_error
- - -
- PASS -
- - - - - - - -
test_convert_deactivate
- - PASS - - - -
test_convert_email
- - -
- SKIP -
- - - - - - - -
test_convert_failed_and_email
- - -
- SKIP -
- - - - - - - -
test_convert_only
- - PASS - - - -
test_convert_parameter
- - -
- SKIP -
- - - - - - - -
test_convert_wrong_excecutable
- - PASS - - - -
test_email_failed
- - -
- PASS -
- - - - - - - -
test_email_only
- - -
- PASS -
- - - - - - - -
test_kindle_send_not_configured
- - -
- SKIP -
- - - - - - - test_email_ssl.test_SSL - 3 - 3 - 0 - 0 - 0 - - Detail - - - - -
test_SSL_None_setup_error
- - -
- PASS -
- - - - - - - -
test_SSL_STARTTLS_setup_error
- - PASS - - - -
test_SSL_only
- - -
- PASS -
- - - - - - - test_email_STARTTLS.test_STARTTLS - 2 - 2 - 0 - 0 - 0 - - Detail - - - - -
test_STARTTLS
- - -
- PASS -
- - - - - - - -
test_STARTTLS_SSL_setup_error
- - PASS - - - test_login.test_login - 6 - 6 - 0 - 0 - 0 - - Detail - - - - -
test_login_capital_letters_user_unicode_password_passwort
- - PASS - - - -
test_login_delete_admin
- - PASS - - - -
test_login_empty_password
- - PASS - - - -
test_login_protected
- - PASS - - - -
test_login_unicode_user_space_end_passwort
- - PASS - - - -
test_login_user_with_space_passwort_end_space
- - PASS - - - test_opds_feed.test_opds_feed - 1 - 0 - 0 - 0 - 1 - - Detail - - - - -
test_opds
- - -
- SKIP -
- - - - - - - test_updater.test_updater - 1 - 0 - 0 - 0 - 1 - - Detail - - - - -
test_updater
- - -
- SKIP -
- - - - - - - test_helper.calibre_helper - 13 - 13 - 0 - 0 - 0 - - Detail - - -
test_author_sort
PASS - +
test_author_sort_comma
- PASS + +
+ ERROR +
+ + + + - +
test_author_sort_junior
PASS - +
test_author_sort_oneword
PASS - +
test_author_sort_roman
PASS - +
test_check_Limit_Length
PASS - +
test_check_char_replacement
PASS - +
test_check_chinese_Characters
- PASS + +
+ FAIL +
+ + + + - +
test_check_degEUR_replacement
- PASS + +
+ SKIP +
+ + + + - +
test_check_doubleS
PASS - +
test_check_finish_Dot
PASS - +
test_check_high23
PASS - +
test_check_umlauts
PASS - - test_register.test_register - 4 - 0 - 0 - 0 - 4 - - Detail - - - - -
test_login_with_password
- - -
- SKIP -
- - - - - - - -
test_registering_user
- - -
- SKIP -
- - - - - - - -
test_registering_user_fail
- - -
- SKIP -
- - - - - - - -
test_resend_password
- - -
- SKIP -
- - - - - - - test_cli.test_cli - 4 - 4 - 0 - 0 - 0 - - Detail - - - - -
test_cli_SSL_files
- - PASS - - - -
test_cli_different_folder
- - PASS - - - -
test_cli_different_settings_database
- - PASS - - - -
test_environ_port_setting
- - PASS - Total - 133 - 76 - 4 - 0 - 53 + 13 + 10 + 1 + 1 + 1   diff --git a/test/js/runner.js b/test/js/runner.js index 2ecf3652..c0750e21 100644 --- a/test/js/runner.js +++ b/test/js/runner.js @@ -1,36 +1,47 @@ output_list = Array(); -/* Level - 0: Summary; 1: Failed; 2: All; 3: Skipped */ +/* Level - 0: Summary; 1: Failed; 2: All; 3: Skipped 4: Error*/ function showCase(level) { table_rows = document.getElementsByTagName("tr"); for (var i = 0; i < table_rows.length; i++) { row = table_rows[i]; id = row.id; + // Show failed if all or failed or summary problems selected if (id.substr(0,2) == 'ft') { - if (level < 1 || level == 3) { - row.classList.add('hiddenRow'); + if (level == 2|| level == 1 || level == 5 ) { + row.classList.remove('hiddenRow'); } else { - row.classList.remove('hiddenRow'); + row.classList.add('hiddenRow'); } } + // Show passed if all selected if (id.substr(0,2) == 'pt') { - if (level > 1 && level != 3) { + if (level == 2 ) { row.classList.remove('hiddenRow'); } else { row.classList.add('hiddenRow'); } } + // Show skipped if all or skipped or summary problems selected if (id.substr(0,2) == 'st') { - if (level >=2) { + if (level ==2 || level ==3 || level == 5) { + row.classList.remove('hiddenRow'); + } + else { + row.classList.add('hiddenRow'); + } + } + // Show error if all or error or summary problems selected + if (id.substr(0,2) == 'et') { + if (level ==4 || level == 2 || level == 5 ) { row.classList.remove('hiddenRow'); } else { row.classList.add('hiddenRow'); } } - } } @@ -51,6 +62,10 @@ function showClassDetail(class_id, count) { testcase_id = 's' + testcase_postfix_id; testcase = document.getElementById(testcase_id); } + if (!testcase) { + testcase_id = 'e' + testcase_postfix_id; + testcase = document.getElementById(testcase_id); + } testcases_list[i] = testcase; if (testcase.classList.contains('hiddenRow')) { all_hidden = false; @@ -89,22 +104,9 @@ function html_escape(s) { return s; } -/* obsoleted by detail in
-function showOutput(id, name) { - var w = window.open("", //url - name, - "resizable,scrollbars,status,width=800,height=450"); - d = w.document; - d.write("
");
-    d.write(html_escape(output_list[id]));
-    d.write("\n");
-    d.write("close\n");
-    d.write("
\n"); - d.close(); -} -*/ +// rgb(38, 154, 188)#31b0d5 function drawCircle(pass, fail, error, skip){ - var color = ["#5cb85c","#d9534f","#c00","#f0ad4e"]; + var color = ["#5cb85c","#d9534f","#31b0d5","#f0ad4e"]; var data = [pass,fail,error,skip]; var text_arr = ["pass", "fail", "error","skip"]; @@ -136,21 +138,21 @@ function drawCircle(pass, fail, error, skip){ function show_img(obj) { var obj1 = obj.nextElementSibling obj1.style.display='block' - var index = 0;//每张图片的下标, + var index = 0; var len = obj1.getElementsByTagName('img').length; var imgyuan = obj1.getElementsByClassName('imgyuan')[0] //var start=setInterval(autoPlay,500); - obj1.onmouseover=function(){//当鼠标光标停在图片上,则停止轮播 + obj1.onmouseover=function(){ clearInterval(start); } - obj1.onmouseout=function(){//当鼠标光标停在图片上,则开始轮播 + obj1.onmouseout=function(){ start=setInterval(autoPlay,1000); } for (var i = 0; i < len; i++) { var font = document.createElement('font') imgyuan.appendChild(font) } - var lis = obj1.getElementsByTagName('font');//得到所有圆圈 + var lis = obj1.getElementsByTagName('font'); changeImg(0) var funny = function (i) { lis[i].onmouseover = function () { @@ -165,12 +167,12 @@ function show_img(obj) { function autoPlay(){ if(index>len-1){ index=0; - clearInterval(start); //运行一轮后停止 + clearInterval(start); } changeImg(index++); } imgyuan.style.width= 25*len +"px"; - //对应圆圈和图片同步 + function changeImg(index) { var list = obj1.getElementsByTagName('img'); var list1 = obj1.getElementsByTagName('font');