robo-automation-test-kit 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- robo_automation_test_kit/__init__.py +8 -0
- robo_automation_test_kit/hookspec.py +36 -0
- robo_automation_test_kit/plugin.py +867 -0
- robo_automation_test_kit/templates/email_report/email_template.html +0 -0
- robo_automation_test_kit/templates/html_report/components/category-chart.html +148 -0
- robo_automation_test_kit/templates/html_report/components/center-chart.html +97 -0
- robo_automation_test_kit/templates/html_report/components/phase-chart.html +148 -0
- robo_automation_test_kit/templates/html_report/components/results-table.html +240 -0
- robo_automation_test_kit/templates/html_report/components/status-center-chart.html +148 -0
- robo_automation_test_kit/templates/html_report/components/summary-chart.html +94 -0
- robo_automation_test_kit/templates/html_report/html_template.html +62 -0
- robo_automation_test_kit/templates/html_report/scripts/css/material-icons.css +20 -0
- robo_automation_test_kit/templates/html_report/scripts/css/report.css +714 -0
- robo_automation_test_kit/templates/html_report/scripts/css/robo-fonts.css +24 -0
- robo_automation_test_kit/templates/html_report/scripts/js/chart.js +14 -0
- robo_automation_test_kit/templates/html_report/scripts/js/report.js +319 -0
- robo_automation_test_kit/utils/RoboHelper.py +420 -0
- robo_automation_test_kit/utils/__init__.py +19 -0
- robo_automation_test_kit/utils/reports/EmailReportUtils.py +0 -0
- robo_automation_test_kit/utils/reports/HtmlReportUtils.py +154 -0
- robo_automation_test_kit/utils/reports/__init__.py +3 -0
- robo_automation_test_kit-1.0.0.dist-info/METADATA +132 -0
- robo_automation_test_kit-1.0.0.dist-info/RECORD +26 -0
- robo_automation_test_kit-1.0.0.dist-info/WHEEL +4 -0
- robo_automation_test_kit-1.0.0.dist-info/entry_points.txt +3 -0
- robo_automation_test_kit-1.0.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
<!-- Status by Center Chart Component -->
|
|
2
|
+
<div class="chart-container">
|
|
3
|
+
<canvas id="statusByCenterChart" width="360" height="288"></canvas>
|
|
4
|
+
</div>
|
|
5
|
+
<script>
|
|
6
|
+
function initializeStatusCenterChart() {
|
|
7
|
+
const ctx = document.getElementById('statusByCenterChart');
|
|
8
|
+
if (!ctx) {
|
|
9
|
+
setTimeout(initializeStatusCenterChart, 100);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (typeof window.statusColors === 'undefined' || typeof window.add3DEffect === 'undefined' || typeof Chart === 'undefined') {
|
|
14
|
+
setTimeout(initializeStatusCenterChart, 100);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const centerStatusData = [
|
|
19
|
+
{% for result in report_rows %}
|
|
20
|
+
{
|
|
21
|
+
center: `{{ result.Center|e }}`,
|
|
22
|
+
status: `{{ result.test_status|e }}`
|
|
23
|
+
}{% if not loop.last %},{% endif %}
|
|
24
|
+
{% endfor %}
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
const statusTypes = window.statusTypes || ['PASSED', 'FAILED', 'SKIPPED'];
|
|
28
|
+
const statusColors = window.statusColors;
|
|
29
|
+
const add3DEffect = window.add3DEffect;
|
|
30
|
+
|
|
31
|
+
const centerSet = new Set();
|
|
32
|
+
centerStatusData.forEach(r => {
|
|
33
|
+
if (r.center && r.center !== '-') centerSet.add(r.center);
|
|
34
|
+
});
|
|
35
|
+
const centerLabels = Array.from(centerSet);
|
|
36
|
+
|
|
37
|
+
const statusByCenter = {};
|
|
38
|
+
centerStatusData.forEach(r => {
|
|
39
|
+
if (!r.center || r.center === '-') return;
|
|
40
|
+
let status = (r.status || '').toUpperCase();
|
|
41
|
+
if (status === 'ERROR') status = 'FAILED';
|
|
42
|
+
if (!statusTypes.includes(status)) return;
|
|
43
|
+
if (!statusByCenter[r.center]) statusByCenter[r.center] = { PASSED: 0, FAILED: 0, SKIPPED: 0 };
|
|
44
|
+
if (statusByCenter[r.center][status] !== undefined) statusByCenter[r.center][status]++;
|
|
45
|
+
if (statusByCenter[r.center][status] !== undefined) statusByCenter[r.center][status]++;
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const barDatasets = statusTypes.map(st => ({
|
|
49
|
+
label: st.charAt(0) + st.slice(1).toLowerCase(),
|
|
50
|
+
data: centerLabels.map(c => (statusByCenter[c] ? statusByCenter[c][st] : 0)),
|
|
51
|
+
backgroundColor: statusColors[st],
|
|
52
|
+
borderWidth: 1
|
|
53
|
+
}));
|
|
54
|
+
|
|
55
|
+
const ctxObj = ctx.getContext('2d');
|
|
56
|
+
const bar3dDatasets = barDatasets.map(ds => ({
|
|
57
|
+
...ds,
|
|
58
|
+
backgroundColor: add3DEffect(ctxObj, 'bar', [statusColors[ds.label.toUpperCase()]])
|
|
59
|
+
}));
|
|
60
|
+
|
|
61
|
+
// Destroy existing chart instance if it exists
|
|
62
|
+
const existingChart = Chart.getChart('statusByCenterChart');
|
|
63
|
+
if (existingChart) {
|
|
64
|
+
existingChart.destroy();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
new Chart(ctxObj, {
|
|
68
|
+
type: 'bar',
|
|
69
|
+
data: {
|
|
70
|
+
labels: centerLabels,
|
|
71
|
+
datasets: bar3dDatasets
|
|
72
|
+
},
|
|
73
|
+
options: {
|
|
74
|
+
indexAxis: 'y',
|
|
75
|
+
responsive: false,
|
|
76
|
+
plugins: {
|
|
77
|
+
legend: {
|
|
78
|
+
display: true,
|
|
79
|
+
position: 'top',
|
|
80
|
+
align: 'center',
|
|
81
|
+
margin: 0,
|
|
82
|
+
labels: {
|
|
83
|
+
font: { size: 10 },
|
|
84
|
+
usePointStyle: true,
|
|
85
|
+
boxHeight: 12,
|
|
86
|
+
pointStyle: 'rect',
|
|
87
|
+
generateLabels: function(chart) {
|
|
88
|
+
return chart.data.datasets.map((ds, i) => {
|
|
89
|
+
const label = ds.label;
|
|
90
|
+
const color = statusColors[label.toUpperCase()] || '#888';
|
|
91
|
+
return {
|
|
92
|
+
text: label,
|
|
93
|
+
fillStyle: color,
|
|
94
|
+
strokeStyle: color,
|
|
95
|
+
lineWidth: 1,
|
|
96
|
+
pointStyle: 'rect',
|
|
97
|
+
hidden: false,
|
|
98
|
+
index: i
|
|
99
|
+
};
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
title: { display: true, text: 'Status by Center', font: { size: 18 }, padding: { top: 0, bottom: 4 } }
|
|
105
|
+
},
|
|
106
|
+
scales: {
|
|
107
|
+
x: {
|
|
108
|
+
stacked: true,
|
|
109
|
+
title: {
|
|
110
|
+
display: true,
|
|
111
|
+
text: 'Test Cases',
|
|
112
|
+
font: { size: 12, weight: 'bold' },
|
|
113
|
+
color: '#212121'
|
|
114
|
+
},
|
|
115
|
+
ticks: {
|
|
116
|
+
font: { size: 10, weight: 'bold' },
|
|
117
|
+
color: '#212121',
|
|
118
|
+
stepSize: 1,
|
|
119
|
+
callback: function(value) {
|
|
120
|
+
if (Number.isInteger(value)) return value;
|
|
121
|
+
return '';
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
y: {
|
|
126
|
+
stacked: true,
|
|
127
|
+
title: { display: false },
|
|
128
|
+
ticks: {
|
|
129
|
+
font: { size: 10, weight: 'bold' },
|
|
130
|
+
color: '#212121',
|
|
131
|
+
stepSize: 1,
|
|
132
|
+
callback: function(value, index) {
|
|
133
|
+
return centerLabels && centerLabels[index] ? centerLabels[index] : value;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
(function() {
|
|
142
|
+
if (document.readyState === 'loading') {
|
|
143
|
+
document.addEventListener('DOMContentLoaded', initializeStatusCenterChart);
|
|
144
|
+
} else {
|
|
145
|
+
initializeStatusCenterChart();
|
|
146
|
+
}
|
|
147
|
+
})();
|
|
148
|
+
</script>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<!-- Results Summary Chart Component -->
|
|
2
|
+
<div class="chart-container">
|
|
3
|
+
<canvas id="summaryChart" width="360" height="288"></canvas>
|
|
4
|
+
</div>
|
|
5
|
+
<script>
|
|
6
|
+
function initializeSummaryChart() {
|
|
7
|
+
const ctx = document.getElementById('summaryChart');
|
|
8
|
+
if (!ctx) {
|
|
9
|
+
setTimeout(initializeSummaryChart, 100);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (typeof window.statusColors === 'undefined' || typeof window.add3DEffect === 'undefined' || typeof Chart === 'undefined') {
|
|
14
|
+
setTimeout(initializeSummaryChart, 100);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Extract status data from template
|
|
19
|
+
const statusData = [
|
|
20
|
+
{% for result in report_rows %}
|
|
21
|
+
`{{ result.test_status|e }}`{% if not loop.last %},{% endif %}
|
|
22
|
+
{% endfor %}
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
// Calculate summary data from status
|
|
26
|
+
const summaryData = [0, 0, 0]; // [Passed, Failed, Skipped]
|
|
27
|
+
statusData.forEach(status => {
|
|
28
|
+
if (status === 'PASSED') summaryData[0]++;
|
|
29
|
+
else if (status === 'FAILED' || status === 'ERROR') summaryData[1]++;
|
|
30
|
+
else if (status === 'SKIPPED') summaryData[2]++;
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// Destroy existing chart instance if it exists
|
|
34
|
+
const existingChart = Chart.getChart('summaryChart');
|
|
35
|
+
if (existingChart) {
|
|
36
|
+
existingChart.destroy();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const baseColors = [window.statusColors['PASSED'], window.statusColors['FAILED'], window.statusColors['SKIPPED']];
|
|
40
|
+
new Chart(ctx.getContext('2d'), {
|
|
41
|
+
type: 'pie',
|
|
42
|
+
data: {
|
|
43
|
+
labels: ['Passed', 'Failed', 'Skipped'],
|
|
44
|
+
datasets: [{
|
|
45
|
+
data: summaryData,
|
|
46
|
+
backgroundColor: window.add3DEffect(ctx.getContext('2d'), 'pie', baseColors),
|
|
47
|
+
borderWidth: 1
|
|
48
|
+
}]
|
|
49
|
+
},
|
|
50
|
+
options: {
|
|
51
|
+
responsive: false,
|
|
52
|
+
plugins: {
|
|
53
|
+
title: {
|
|
54
|
+
display: true,
|
|
55
|
+
text: 'Results Summary',
|
|
56
|
+
font: { size: 16, weight: 'bold' },
|
|
57
|
+
color: '#212121',
|
|
58
|
+
padding: { top: 0, bottom: 12 }
|
|
59
|
+
},
|
|
60
|
+
legend: {
|
|
61
|
+
display: true,
|
|
62
|
+
position: 'right',
|
|
63
|
+
align: 'center',
|
|
64
|
+
labels: {
|
|
65
|
+
font: { size: 14 },
|
|
66
|
+
usePointStyle: true,
|
|
67
|
+
pointStyle: 'circle',
|
|
68
|
+
generateLabels: function(chart) {
|
|
69
|
+
const data = chart.data;
|
|
70
|
+
return data.labels.map((label, i) => {
|
|
71
|
+
return {
|
|
72
|
+
text: label,
|
|
73
|
+
fillStyle: baseColors[i],
|
|
74
|
+
strokeStyle: baseColors[i],
|
|
75
|
+
lineWidth: 1,
|
|
76
|
+
hidden: false,
|
|
77
|
+
index: i
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
(function() {
|
|
88
|
+
if (document.readyState === 'loading') {
|
|
89
|
+
document.addEventListener('DOMContentLoaded', initializeSummaryChart);
|
|
90
|
+
} else {
|
|
91
|
+
initializeSummaryChart();
|
|
92
|
+
}
|
|
93
|
+
})();
|
|
94
|
+
</script>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
{% set page_title = (summary.project_name ~ ' ' if summary.project_name else '') ~ report_title ~ (' - ( ' ~
|
|
4
|
+
summary.env_name ~ ' )' if summary.env_name else '') %}
|
|
5
|
+
|
|
6
|
+
<head>
|
|
7
|
+
<meta charset="UTF-8">
|
|
8
|
+
<title>{{ page_title }}</title>
|
|
9
|
+
<style>
|
|
10
|
+
{{ embedded_material_icons }}
|
|
11
|
+
{{ embedded_robo_fonts }}
|
|
12
|
+
</style>
|
|
13
|
+
<script>
|
|
14
|
+
{{ embedded_chart_js }}
|
|
15
|
+
</script>
|
|
16
|
+
<script>
|
|
17
|
+
{{ embedded_report_js }}
|
|
18
|
+
</script>
|
|
19
|
+
<style>
|
|
20
|
+
{{ embedded_css }}
|
|
21
|
+
</style>
|
|
22
|
+
</head>
|
|
23
|
+
|
|
24
|
+
<body>
|
|
25
|
+
<div class="dashboard-container">
|
|
26
|
+
<div>
|
|
27
|
+
<div class="dashboard-header">
|
|
28
|
+
<div class="dashboard-title">{{ page_title }}</div>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div class="charts-row">
|
|
32
|
+
<!-- Results Summary Chart Component -->
|
|
33
|
+
{% include "components/summary-chart.html" %}
|
|
34
|
+
<!-- Distribution by Center Chart Component -->
|
|
35
|
+
{% if report_rows|selectattr('Center')|select|list|length > 0 %}
|
|
36
|
+
{% include "components/center-chart.html" %}
|
|
37
|
+
{% endif %}
|
|
38
|
+
<!-- Status by Phase Chart Component -->
|
|
39
|
+
{% if report_rows|selectattr('Phase')|select|list|length > 0 %}
|
|
40
|
+
{% include "components/phase-chart.html" %}
|
|
41
|
+
{% endif %}
|
|
42
|
+
<!-- Status by Request Category Chart Component -->
|
|
43
|
+
{% if report_rows|selectattr('Request Category')|select|list|length > 0 %}
|
|
44
|
+
{% include "components/category-chart.html" %}
|
|
45
|
+
{% endif %}
|
|
46
|
+
<!-- Status by Center Chart Component -->
|
|
47
|
+
{% if report_rows|selectattr('Center')|select|list|length > 0 %}
|
|
48
|
+
{% include "components/status-center-chart.html" %}
|
|
49
|
+
{% endif %}
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<!-- Results Table Component -->
|
|
53
|
+
{% include "components/results-table.html" %}
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
<footer class="report-footer">
|
|
57
|
+
This report was generated by <strong>{{ summary.test_framework }}</strong> on <strong>{{ summary.generated_date
|
|
58
|
+
}}</strong> at <strong>{{ summary.generated_time }}</strong>.
|
|
59
|
+
</footer>
|
|
60
|
+
</body>
|
|
61
|
+
|
|
62
|
+
</html>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: 'Material Icons';
|
|
3
|
+
font-style: normal;
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
src: url(https://fonts.gstatic.com/s/materialicons/v145/flUhRq6tzZclQEJ-Vdg-IuiaDsNZ.ttf) format('truetype');
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.material-icons {
|
|
9
|
+
font-family: 'Material Icons';
|
|
10
|
+
font-weight: normal;
|
|
11
|
+
font-style: normal;
|
|
12
|
+
font-size: 24px;
|
|
13
|
+
line-height: 1;
|
|
14
|
+
letter-spacing: normal;
|
|
15
|
+
text-transform: none;
|
|
16
|
+
display: inline-block;
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
word-wrap: normal;
|
|
19
|
+
direction: ltr;
|
|
20
|
+
}
|