test-reporting 1.2.4__tar.gz → 1.3.0__tar.gz

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.
Files changed (23) hide show
  1. {test_reporting-1.2.4/test_reporting.egg-info → test_reporting-1.3.0}/PKG-INFO +1 -1
  2. {test_reporting-1.2.4 → test_reporting-1.3.0}/reporting/dashboard_generator_v2.py +3 -1
  3. {test_reporting-1.2.4 → test_reporting-1.3.0}/reporting/history_dashboard.py +34 -2
  4. {test_reporting-1.2.4 → test_reporting-1.3.0}/reporting/overview_dashboard.py +3 -0
  5. {test_reporting-1.2.4 → test_reporting-1.3.0}/reporting/storage.py +11 -3
  6. {test_reporting-1.2.4 → test_reporting-1.3.0}/setup.py +1 -1
  7. {test_reporting-1.2.4 → test_reporting-1.3.0/test_reporting.egg-info}/PKG-INFO +1 -1
  8. {test_reporting-1.2.4 → test_reporting-1.3.0}/LICENSE +0 -0
  9. {test_reporting-1.2.4 → test_reporting-1.3.0}/README.md +0 -0
  10. {test_reporting-1.2.4 → test_reporting-1.3.0}/reporting/__init__.py +0 -0
  11. {test_reporting-1.2.4 → test_reporting-1.3.0}/reporting/classifier.py +0 -0
  12. {test_reporting-1.2.4 → test_reporting-1.3.0}/reporting/cli.py +0 -0
  13. {test_reporting-1.2.4 → test_reporting-1.3.0}/reporting/config.py +0 -0
  14. {test_reporting-1.2.4 → test_reporting-1.3.0}/reporting/dashboard_generator.py +0 -0
  15. {test_reporting-1.2.4 → test_reporting-1.3.0}/reporting/modern_design_system.py +0 -0
  16. {test_reporting-1.2.4 → test_reporting-1.3.0}/reporting/plugin.py +0 -0
  17. {test_reporting-1.2.4 → test_reporting-1.3.0}/reporting/projects_dashboard.py +0 -0
  18. {test_reporting-1.2.4 → test_reporting-1.3.0}/setup.cfg +0 -0
  19. {test_reporting-1.2.4 → test_reporting-1.3.0}/test_reporting.egg-info/SOURCES.txt +0 -0
  20. {test_reporting-1.2.4 → test_reporting-1.3.0}/test_reporting.egg-info/dependency_links.txt +0 -0
  21. {test_reporting-1.2.4 → test_reporting-1.3.0}/test_reporting.egg-info/entry_points.txt +0 -0
  22. {test_reporting-1.2.4 → test_reporting-1.3.0}/test_reporting.egg-info/requires.txt +0 -0
  23. {test_reporting-1.2.4 → test_reporting-1.3.0}/test_reporting.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: test-reporting
3
- Version: 1.2.4
3
+ Version: 1.3.0
4
4
  Summary: Beautiful multi-project test reporting dashboard system
5
5
  Home-page: https://github.com/amahdy77/test-reporting.git
6
6
  Author: Ashfaqur Mahdy
@@ -581,7 +581,9 @@ class EnhancedDashboardGenerator:
581
581
  <div class="message">
582
582
  <h2>${{healthScore >= 90 ? 'All systems healthy' : healthScore >= 70 ? 'Some issues detected' : 'Critical failures'}}</h2>
583
583
  <p>
584
- Build #${{run.build_number || 'N/A'}}
584
+ ${{run.project_name ? `<strong>Project:</strong> ${{run.project_name}} | ` : ''}}
585
+ <strong>Build:</strong> #${{run.build_number || 'N/A'}} |
586
+ <strong>Suite:</strong> ${{run.suite_name || 'N/A'}}
585
587
  ${{run.build_url ? `<a href="${{run.build_url}}" target="_blank" style="color: #4F46E5; text-decoration: none; margin-left: 10px;">🔗 View CI Build</a>` : ''}}
586
588
  <br>
587
589
  ${{new Date(run.timestamp).toLocaleString()}}
@@ -337,6 +337,12 @@ class HistoryDashboardGenerator:
337
337
  <label>Search Build/Suite</label>
338
338
  <input type="text" id="searchText" placeholder="Enter build number or suite name...">
339
339
  </div>
340
+ <div class="search-field">
341
+ <label>Project</label>
342
+ <select id="filterProject">
343
+ <option value="">All Projects</option>
344
+ </select>
345
+ </div>
340
346
  <div class="search-field">
341
347
  <label>Status</label>
342
348
  <select id="filterStatus">
@@ -378,6 +384,7 @@ class HistoryDashboardGenerator:
378
384
  <thead>
379
385
  <tr>
380
386
  <th>Run ID</th>
387
+ <th>Project</th>
381
388
  <th>Build</th>
382
389
  <th>Date/Time</th>
383
390
  <th>Tests</th>
@@ -388,7 +395,7 @@ class HistoryDashboardGenerator:
388
395
  </thead>
389
396
  <tbody id="runsTableBody">
390
397
  <tr>
391
- <td colspan="7" class="no-data">Loading...</td>
398
+ <td colspan="8" class="no-data">Loading...</td>
392
399
  </tr>
393
400
  </tbody>
394
401
  </table>
@@ -400,6 +407,19 @@ class HistoryDashboardGenerator:
400
407
  let allRuns = historyData.runs || [];
401
408
  let filteredRuns = [...allRuns];
402
409
 
410
+ // Populate project filter dropdown
411
+ function populateProjectFilter() {{
412
+ const projects = [...new Set(allRuns.map(run => run.project_name).filter(p => p))];
413
+ const filterProject = document.getElementById('filterProject');
414
+
415
+ projects.sort().forEach(project => {{
416
+ const option = document.createElement('option');
417
+ option.value = project;
418
+ option.textContent = project;
419
+ filterProject.appendChild(option);
420
+ }});
421
+ }}
422
+
403
423
  // Check for file parameter in URL
404
424
  const urlParams = new URLSearchParams(window.location.search);
405
425
  const fileParam = urlParams.get('file');
@@ -408,7 +428,7 @@ class HistoryDashboardGenerator:
408
428
  const tbody = document.getElementById('runsTableBody');
409
429
 
410
430
  if (filteredRuns.length === 0) {{
411
- tbody.innerHTML = '<tr><td colspan="7" class="no-data">No test runs found</td></tr>';
431
+ tbody.innerHTML = '<tr><td colspan="8" class="no-data">No test runs found</td></tr>';
412
432
  return;
413
433
  }}
414
434
 
@@ -436,9 +456,14 @@ class HistoryDashboardGenerator:
436
456
  ? testFiles.slice(0, 3).join(', ') + (testFiles.length > 3 ? '...' : '')
437
457
  : 'N/A';
438
458
 
459
+ const projectName = run.project_name || 'Unknown';
460
+
439
461
  return `
440
462
  <tr onclick="viewRunDetails(${{run.id}})">
441
463
  <td class="run-id">#${{run.id}}</td>
464
+ <td>
465
+ <span class="badge">${{projectName}}</span>
466
+ </td>
442
467
  <td>
443
468
  ${{run.build_number}}
444
469
  <span class="badge">${{run.suite_name}}</span>
@@ -476,6 +501,7 @@ class HistoryDashboardGenerator:
476
501
 
477
502
  function applyFilters() {{
478
503
  const searchText = document.getElementById('searchText').value.toLowerCase();
504
+ const filterProject = document.getElementById('filterProject').value;
479
505
  const filterStatus = document.getElementById('filterStatus').value;
480
506
  const filterDate = document.getElementById('filterDate').value;
481
507
 
@@ -490,6 +516,9 @@ class HistoryDashboardGenerator:
490
516
  if (!matchesBuild && !matchesSuite && !matchesFile) return false;
491
517
  }}
492
518
 
519
+ // Project filter
520
+ if (filterProject && run.project_name !== filterProject) return false;
521
+
493
522
  // Status filter
494
523
  if (filterStatus === 'passed' && run.failed > 0) return false;
495
524
  if (filterStatus === 'failed' && run.failed === 0) return false;
@@ -523,6 +552,9 @@ class HistoryDashboardGenerator:
523
552
  }}
524
553
  }});
525
554
 
555
+ // Initialize
556
+ populateProjectFilter();
557
+
526
558
  // Auto-filter by file if parameter is present
527
559
  if (fileParam) {{
528
560
  document.getElementById('searchText').value = fileParam;
@@ -957,6 +957,7 @@ class OverviewDashboardGenerator:
957
957
  <div class="hotspot-count">${{hotspot.failure_count}} failures</div>
958
958
  </div>
959
959
  <div class="hotspot-details">
960
+ ${{hotspot.project_name ? `<strong>${{hotspot.project_name}}</strong> • ` : ''}}
960
961
  ${{hotspot.file_name}} •
961
962
  ${{hotspot.failure_type || 'UNKNOWN'}} •
962
963
  Last failed: ${{new Date(hotspot.last_failed).toLocaleDateString()}}
@@ -985,6 +986,7 @@ class OverviewDashboardGenerator:
985
986
  <div class="hotspot-count" style="background: #f59e0b;">${{test.pass_rate}}% pass rate</div>
986
987
  </div>
987
988
  <div class="hotspot-details">
989
+ ${{test.project_name ? `<strong>${{test.project_name}}</strong> • ` : ''}}
988
990
  ${{test.file_name}} •
989
991
  ${{test.total_runs}} runs: ${{test.passed_count}} passed, ${{test.failed_count}} failed •
990
992
  Flakiness: ${{test.flakiness_score}}
@@ -1012,6 +1014,7 @@ class OverviewDashboardGenerator:
1012
1014
  <div class="module-info">
1013
1015
  <div class="module-name">${{test.test_name}}</div>
1014
1016
  <div class="module-stats">
1017
+ ${{test.project_name ? `<strong>${{test.project_name}}</strong> • ` : ''}}
1015
1018
  ${{test.file_name}} •
1016
1019
  Avg: ${{avgDuration}}s •
1017
1020
  Min: ${{test.min_duration}}s •
@@ -526,12 +526,13 @@ class TestResultStorage:
526
526
  SELECT
527
527
  test_name,
528
528
  file_name,
529
+ project_name,
529
530
  COUNT(*) as failure_count,
530
531
  MAX(created_at) as last_failed,
531
532
  failure_type
532
533
  FROM test_results
533
534
  {where_clause}
534
- GROUP BY test_name, file_name
535
+ GROUP BY test_name, file_name, project_name
535
536
  ORDER BY failure_count DESC
536
537
  LIMIT ?
537
538
  ''', params)
@@ -541,6 +542,7 @@ class TestResultStorage:
541
542
  hotspots.append({
542
543
  'test_name': row['test_name'],
543
544
  'file_name': row['file_name'],
545
+ 'project_name': row['project_name'],
544
546
  'failure_count': row['failure_count'],
545
547
  'last_failed': row['last_failed'],
546
548
  'failure_type': row['failure_type']
@@ -600,6 +602,7 @@ class TestResultStorage:
600
602
  SELECT
601
603
  test_name,
602
604
  file_name,
605
+ project_name,
603
606
  COUNT(*) as total_runs,
604
607
  SUM(CASE WHEN status = 'passed' THEN 1 ELSE 0 END) as passed_count,
605
608
  SUM(CASE WHEN status = 'failed' THEN 1 ELSE 0 END) as failed_count,
@@ -607,7 +610,7 @@ class TestResultStorage:
607
610
  MAX(created_at) as last_run
608
611
  FROM test_results
609
612
  {where_clause}
610
- GROUP BY test_name, file_name
613
+ GROUP BY test_name, file_name, project_name
611
614
  HAVING total_runs >= ?
612
615
  AND passed_count > 0
613
616
  AND failed_count > 0
@@ -620,6 +623,7 @@ class TestResultStorage:
620
623
  flaky.append({
621
624
  'test_name': row['test_name'],
622
625
  'file_name': row['file_name'],
626
+ 'project_name': row['project_name'],
623
627
  'total_runs': row['total_runs'],
624
628
  'passed_count': row['passed_count'],
625
629
  'failed_count': row['failed_count'],
@@ -673,19 +677,21 @@ class TestResultStorage:
673
677
  SELECT
674
678
  test_name,
675
679
  file_name,
680
+ project_name,
676
681
  AVG(duration_seconds) as avg_duration,
677
682
  MIN(duration_seconds) as min_duration,
678
683
  MAX(duration_seconds) as max_duration,
679
684
  COUNT(*) as run_count
680
685
  FROM test_results
681
686
  {where_clause}
682
- GROUP BY test_name, file_name
687
+ GROUP BY test_name, file_name, project_name
683
688
  HAVING run_count >= 2
684
689
  ),
685
690
  slowest_per_file AS (
686
691
  SELECT
687
692
  test_name,
688
693
  file_name,
694
+ project_name,
689
695
  avg_duration,
690
696
  min_duration,
691
697
  max_duration,
@@ -696,6 +702,7 @@ class TestResultStorage:
696
702
  SELECT
697
703
  test_name,
698
704
  file_name,
705
+ project_name,
699
706
  avg_duration,
700
707
  min_duration,
701
708
  max_duration,
@@ -711,6 +718,7 @@ class TestResultStorage:
711
718
  slowest.append({
712
719
  'test_name': row['test_name'],
713
720
  'file_name': row['file_name'],
721
+ 'project_name': row['project_name'],
714
722
  'avg_duration': round(row['avg_duration'], 2),
715
723
  'min_duration': round(row['min_duration'], 2),
716
724
  'max_duration': round(row['max_duration'], 2),
@@ -9,7 +9,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
9
9
 
10
10
  setup(
11
11
  name='test-reporting',
12
- version='1.2.4',
12
+ version='1.3.0',
13
13
  description='Beautiful multi-project test reporting dashboard system',
14
14
  long_description=long_description,
15
15
  long_description_content_type="text/markdown",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: test-reporting
3
- Version: 1.2.4
3
+ Version: 1.3.0
4
4
  Summary: Beautiful multi-project test reporting dashboard system
5
5
  Home-page: https://github.com/amahdy77/test-reporting.git
6
6
  Author: Ashfaqur Mahdy
File without changes
File without changes
File without changes