diff --git a/src/contraqctor/qc/reporters.py b/src/contraqctor/qc/reporters.py index 7919c03..a7f84b0 100644 --- a/src/contraqctor/qc/reporters.py +++ b/src/contraqctor/qc/reporters.py @@ -203,7 +203,8 @@ def _print_test_result( f"[bold {color}]{idx}. {group_name_escaped} {test_result.suite_name}.{test_result.test_name}[/bold {color}]" ) - self.console.print(f"[{color}]Result:[/{color}] {test_result.result}") + result_str = "" if test_result.result is None else test_result.result + self.console.print(f"[{color}]Result:[/{color}] {result_str}") if render_message and test_result.message: self.console.print(f"[{color}]Message:[/{color}] {test_result.message}") diff --git a/src/contraqctor/qc/templates/report.html b/src/contraqctor/qc/templates/report.html index 21c40ce..ab2b964 100644 --- a/src/contraqctor/qc/templates/report.html +++ b/src/contraqctor/qc/templates/report.html @@ -1,626 +1,816 @@ - + - - - - Test Results Report - - - -
-

Test Results Report

-

- contraqctor v{{ version }} • Test run: {{ timestamp }} -

- -
-
-
-
{{ statistics.total }}
-
Total
-
-
-
{{ statistics.passed }}
-
Passed
-
-
-
{{ statistics.failed }}
-
Failed
-
-
-
{{ statistics.error }}
-
Error
-
-
-
{{ statistics.warnings }}
-
Warning
+ + .progress-segment { + height: 100%; + transition: width 0.3s ease; + } + + .progress-passed { + background-color: #27ae60; + } + .progress-failed { + background-color: #e74c3c; + } + .progress-error { + background-color: #9b59b6; + } + .progress-skipped { + background-color: #f39c12; + } + .progress-warning { + background-color: #e67e22; + } + + .overview { + margin-bottom: 40px; + } + + .overview h2 { + margin-top: 0; + } + + .results h2 { + margin-top: 0; + } + + .overview-tree { + border: 1px solid #ddd; + border-radius: 6px; + overflow: hidden; + } + + .tree-group { + border-bottom: 1px solid #e0e0e0; + } + + .tree-group:last-child { + border-bottom: none; + } + + .tree-group-header { + background-color: #f8f9fa; + padding: 12px 15px; + cursor: pointer; + display: flex; + align-items: center; + gap: 10px; + transition: background-color 0.2s; + } + + .tree-group-header:hover { + background-color: #e9ecef; + } + + .tree-toggle { + font-size: 0.8em; + transition: transform 0.2s; + } + + .tree-group.collapsed .tree-toggle { + transform: rotate(-90deg); + } + + .tree-group-title { + font-weight: bold; + flex: 1; + } + + .tree-group-stats { + font-size: 0.9em; + color: #666; + display: flex; + align-items: center; + gap: 10px; + } + + .tree-group-progress { + height: 8px; + min-width: 120px; + background-color: #ecf0f1; + border-radius: 4px; + overflow: hidden; + display: flex; + } + + .tree-progress-segment { + height: 100%; + } + + .tree-progress-passed { + background-color: #27ae60; + } + .tree-progress-failed { + background-color: #e74c3c; + } + .tree-progress-error { + background-color: #9b59b6; + } + .tree-progress-skipped { + background-color: #f39c12; + } + .tree-progress-warning { + background-color: #e67e22; + } + + .tree-suite-list { + background-color: white; + } + + .tree-group.collapsed .tree-suite-list { + display: none; + } + + .tree-suite { + border-bottom: 1px solid #f0f0f0; + } + + .tree-suite:last-child { + border-bottom: none; + } + + .tree-suite-header { + padding: 10px 15px 10px 40px; + cursor: pointer; + display: flex; + align-items: center; + gap: 10px; + background-color: #fdfdfd; + transition: background-color 0.2s; + } + + .tree-suite-header:hover { + background-color: #f5f5f5; + } + + .tree-suite-title { + font-weight: 500; + flex: 1; + } + + .tree-suite-stats { + font-size: 0.9em; + color: #666; + display: flex; + align-items: center; + gap: 10px; + } + + .tree-test-list { + background-color: #fafafa; + } + + .tree-suite.collapsed .tree-test-list { + display: none; + } + + .tree-test-item { + border-bottom: 1px solid #f0f0f0; + } + + .tree-test-item:last-child { + border-bottom: none; + } + + .tree-test-header { + padding: 8px 15px 8px 65px; + display: flex; + align-items: center; + justify-content: space-between; + cursor: pointer; + transition: background-color 0.2s; + } + + .tree-test-header:hover { + background-color: #f0f0f0; + } + + .tree-test-title { + display: flex; + align-items: center; + gap: 10px; + flex: 1; + } + + .tree-test-name { + color: #333; + } + + .tree-test-details { + padding: 15px 20px 15px 65px; + background-color: white; + border-top: 1px solid #e0e0e0; + } + + .tree-test-item.collapsed .tree-test-details { + display: none; + } + + .tree-status-icon { + width: 8px; + height: 8px; + border-radius: 50%; + flex-shrink: 0; + } + + .tree-status-icon.passed { + background-color: #27ae60; + } + .tree-status-icon.failed { + background-color: #e74c3c; + } + .tree-status-icon.error { + background-color: #9b59b6; + } + .tree-status-icon.skipped { + background-color: #f39c12; + } + .tree-status-icon.warning { + background-color: #e67e22; + } + + .status-badge { + padding: 4px 12px; + border-radius: 4px; + font-size: 0.85em; + font-weight: bold; + text-transform: uppercase; + } + + .status-PASSED { + background-color: #27ae60; + color: white; + } + .status-FAILED { + background-color: #e74c3c; + color: white; + } + .status-ERROR { + background-color: #9b59b6; + color: white; + } + .status-SKIPPED { + background-color: #f39c12; + color: white; + } + .status-WARNING { + background-color: #e67e22; + color: white; + } + + .test-section { + margin-bottom: 15px; + } + + .test-section:last-child { + margin-bottom: 0; + } + + .test-section-title { + font-weight: bold; + color: #555; + margin-bottom: 5px; + } + + .test-section-content { + padding: 10px; + background-color: #f8f9fa; + border-radius: 4px; + white-space: pre-wrap; + word-break: break-word; + font-family: "Courier New", Courier, monospace; + font-size: 0.9em; + } + + .context-image { + max-width: 100%; + height: auto; + border-radius: 4px; + margin: 10px 0; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + } + + .context-item { + margin-bottom: 15px; + } + + .context-item:last-child { + margin-bottom: 0; + } + + .context-key { + font-weight: bold; + color: #555; + margin-bottom: 5px; + } + + .traceback { + font-family: "Courier New", Courier, monospace; + font-size: 0.9em; + background-color: #2c3e50; + color: #ecf0f1; + padding: 15px; + border-radius: 4px; + overflow-x: auto; + } + + .no-results { + text-align: center; + padding: 40px; + color: #7f8c8d; + font-style: italic; + } + + @media (max-width: 768px) { + .summary-stats { + flex-direction: column; + } + + .stat-item { + width: 100%; + } + } + + + +
+

Test Results Report

+

+ contraqctor v{{ version }} • Test run: {{ + timestamp }} +

+ +
+
+
+
{{ statistics.total }}
+
Total
+
+
+
+ {{ statistics.passed }} +
+
Passed
+
+
+
+ {{ statistics.failed }} +
+
Failed
+
+
+
+ {{ statistics.error }} +
+
Error
+
+
+
+ {{ statistics.warnings }} +
+
Warning
+
+
+
+ {{ statistics.skipped }} +
+
Skipped
+
-
-
{{ statistics.skipped }}
-
Skipped
+ + {% if statistics.total > 0 %} +
+ {% if statistics.passed > 0 %} +
+ {% endif %} {% if statistics.failed > 0 %} +
+ {% endif %} {% if statistics.error > 0 %} +
+ {% endif %} {% if statistics.warnings > 0 %} +
+ {% endif %} {% if statistics.skipped > 0 %} +
+ {% endif %}
-
- - {% if statistics.total > 0 %} -
- {% if statistics.passed > 0 %} -
- {% endif %} - {% if statistics.failed > 0 %} -
- {% endif %} - {% if statistics.error > 0 %} -
- {% endif %} - {% if statistics.warnings > 0 %} -
- {% endif %} - {% if statistics.skipped > 0 %} -
{% endif %}
- {% endif %} -
-
-

Test Results

-
- {% for group in groups %} -