test-reporting 1.2.3__tar.gz → 1.2.4__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.3/test_reporting.egg-info → test_reporting-1.2.4}/PKG-INFO +41 -4
  2. {test_reporting-1.2.3 → test_reporting-1.2.4}/README.md +40 -3
  3. {test_reporting-1.2.3 → test_reporting-1.2.4}/reporting/cli.py +9 -4
  4. {test_reporting-1.2.3 → test_reporting-1.2.4}/reporting/dashboard_generator_v2.py +14 -9
  5. {test_reporting-1.2.3 → test_reporting-1.2.4}/reporting/history_dashboard.py +9 -4
  6. {test_reporting-1.2.3 → test_reporting-1.2.4}/reporting/overview_dashboard.py +3 -4
  7. {test_reporting-1.2.3 → test_reporting-1.2.4}/setup.py +1 -1
  8. {test_reporting-1.2.3 → test_reporting-1.2.4/test_reporting.egg-info}/PKG-INFO +41 -4
  9. {test_reporting-1.2.3 → test_reporting-1.2.4}/LICENSE +0 -0
  10. {test_reporting-1.2.3 → test_reporting-1.2.4}/reporting/__init__.py +0 -0
  11. {test_reporting-1.2.3 → test_reporting-1.2.4}/reporting/classifier.py +0 -0
  12. {test_reporting-1.2.3 → test_reporting-1.2.4}/reporting/config.py +0 -0
  13. {test_reporting-1.2.3 → test_reporting-1.2.4}/reporting/dashboard_generator.py +0 -0
  14. {test_reporting-1.2.3 → test_reporting-1.2.4}/reporting/modern_design_system.py +0 -0
  15. {test_reporting-1.2.3 → test_reporting-1.2.4}/reporting/plugin.py +0 -0
  16. {test_reporting-1.2.3 → test_reporting-1.2.4}/reporting/projects_dashboard.py +0 -0
  17. {test_reporting-1.2.3 → test_reporting-1.2.4}/reporting/storage.py +0 -0
  18. {test_reporting-1.2.3 → test_reporting-1.2.4}/setup.cfg +0 -0
  19. {test_reporting-1.2.3 → test_reporting-1.2.4}/test_reporting.egg-info/SOURCES.txt +0 -0
  20. {test_reporting-1.2.3 → test_reporting-1.2.4}/test_reporting.egg-info/dependency_links.txt +0 -0
  21. {test_reporting-1.2.3 → test_reporting-1.2.4}/test_reporting.egg-info/entry_points.txt +0 -0
  22. {test_reporting-1.2.3 → test_reporting-1.2.4}/test_reporting.egg-info/requires.txt +0 -0
  23. {test_reporting-1.2.3 → test_reporting-1.2.4}/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.3
3
+ Version: 1.2.4
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
@@ -139,9 +139,9 @@ test-report open
139
139
 
140
140
  ## 🎯 Multi-Project Setup
141
141
 
142
- ### **Shared Database**
142
+ ### **Shared Database Workflow**
143
143
 
144
- All projects can share one database:
144
+ All projects can share one database. Here's how it works:
145
145
 
146
146
  ```
147
147
  workspace/
@@ -150,17 +150,54 @@ workspace/
150
150
  ├── project-a/
151
151
  │ ├── tests/
152
152
  │ └── reporting.ini ← project_name = Project A
153
+ │ db_path = ../shared_test_results.db
153
154
 
154
155
  ├── project-b/
155
156
  │ ├── tests/
156
157
  │ └── reporting.ini ← project_name = Project B
158
+ │ db_path = ../shared_test_results.db
157
159
 
158
160
  └── project-c/
159
161
  ├── tests/
160
162
  └── reporting.ini ← project_name = Project C
163
+ db_path = ../shared_test_results.db
161
164
  ```
162
165
 
163
- Each project's data is tagged with its project name. The landing page shows all projects.
166
+ ### **How It Works:**
167
+
168
+ 1. **Running Tests** - Each project stores its test results in the shared database:
169
+ ```bash
170
+ cd project-a
171
+ pytest # Stores results tagged with "Project A"
172
+
173
+ cd ../project-b
174
+ pytest # Stores results tagged with "Project B"
175
+ ```
176
+
177
+ 2. **Generating Dashboards** - Run from ANY project to generate dashboards with ALL data:
178
+ ```bash
179
+ cd project-a
180
+ test-report generate # Pulls ALL projects from shared DB
181
+ ```
182
+
183
+ The `generate` command:
184
+ - ✅ Reads ALL project data from the shared database
185
+ - ✅ Generates a projects landing page showing all projects
186
+ - ✅ Creates overview, history, and run-details dashboards
187
+ - ✅ Data from all projects is preserved and accessible
188
+
189
+ 3. **Viewing Results** - The dashboards show aggregated data:
190
+ - **Projects Landing Page** (`index.html`) - Lists all projects with health scores
191
+ - **Overview Dashboard** (`overview.html`) - Shows metrics across all projects
192
+ - **History Dashboard** (`history.html`) - All test runs from all projects
193
+ - **Run Details** (`run-details.html`) - Latest run details
194
+
195
+ ### **Key Benefits:**
196
+
197
+ - 🔄 **Data Persistence** - Running `test-report generate` from one project doesn't lose data from other projects
198
+ - 📊 **Centralized View** - See all your test projects in one place
199
+ - 🎯 **Project Filtering** - Dashboards support filtering by project (future enhancement)
200
+ - 🔒 **Concurrent Safe** - Multiple projects can run tests simultaneously
164
201
 
165
202
  ---
166
203
 
@@ -105,9 +105,9 @@ test-report open
105
105
 
106
106
  ## 🎯 Multi-Project Setup
107
107
 
108
- ### **Shared Database**
108
+ ### **Shared Database Workflow**
109
109
 
110
- All projects can share one database:
110
+ All projects can share one database. Here's how it works:
111
111
 
112
112
  ```
113
113
  workspace/
@@ -116,17 +116,54 @@ workspace/
116
116
  ├── project-a/
117
117
  │ ├── tests/
118
118
  │ └── reporting.ini ← project_name = Project A
119
+ │ db_path = ../shared_test_results.db
119
120
 
120
121
  ├── project-b/
121
122
  │ ├── tests/
122
123
  │ └── reporting.ini ← project_name = Project B
124
+ │ db_path = ../shared_test_results.db
123
125
 
124
126
  └── project-c/
125
127
  ├── tests/
126
128
  └── reporting.ini ← project_name = Project C
129
+ db_path = ../shared_test_results.db
127
130
  ```
128
131
 
129
- Each project's data is tagged with its project name. The landing page shows all projects.
132
+ ### **How It Works:**
133
+
134
+ 1. **Running Tests** - Each project stores its test results in the shared database:
135
+ ```bash
136
+ cd project-a
137
+ pytest # Stores results tagged with "Project A"
138
+
139
+ cd ../project-b
140
+ pytest # Stores results tagged with "Project B"
141
+ ```
142
+
143
+ 2. **Generating Dashboards** - Run from ANY project to generate dashboards with ALL data:
144
+ ```bash
145
+ cd project-a
146
+ test-report generate # Pulls ALL projects from shared DB
147
+ ```
148
+
149
+ The `generate` command:
150
+ - ✅ Reads ALL project data from the shared database
151
+ - ✅ Generates a projects landing page showing all projects
152
+ - ✅ Creates overview, history, and run-details dashboards
153
+ - ✅ Data from all projects is preserved and accessible
154
+
155
+ 3. **Viewing Results** - The dashboards show aggregated data:
156
+ - **Projects Landing Page** (`index.html`) - Lists all projects with health scores
157
+ - **Overview Dashboard** (`overview.html`) - Shows metrics across all projects
158
+ - **History Dashboard** (`history.html`) - All test runs from all projects
159
+ - **Run Details** (`run-details.html`) - Latest run details
160
+
161
+ ### **Key Benefits:**
162
+
163
+ - 🔄 **Data Persistence** - Running `test-report generate` from one project doesn't lose data from other projects
164
+ - 📊 **Centralized View** - See all your test projects in one place
165
+ - 🎯 **Project Filtering** - Dashboards support filtering by project (future enhancement)
166
+ - 🔒 **Concurrent Safe** - Multiple projects can run tests simultaneously
130
167
 
131
168
  ---
132
169
 
@@ -12,13 +12,18 @@ from .config import ReportingConfig
12
12
 
13
13
 
14
14
  def generate_dashboard():
15
- """Generate all dashboards (projects landing, overview, run-details, and history)."""
16
- print("[Reporting] Generating dashboards...")
15
+ """Generate all dashboards (projects landing, overview, run-details, and history).
16
+
17
+ Dashboards are generated with ALL project data from the shared database.
18
+ Individual dashboards can be filtered by project via URL parameters.
19
+ """
20
+ print("[Reporting] Generating dashboards from shared database...")
17
21
 
18
22
  # Create config instance
19
23
  config = ReportingConfig()
20
- print(f"[Reporting] Project: {config.PROJECT_NAME}")
21
- print(f"[Reporting] Database: {config.DB_PATH}")
24
+ print(f"[Reporting] Current Project: {config.PROJECT_NAME}")
25
+ print(f"[Reporting] Shared Database: {config.DB_PATH}")
26
+ print(f"[Reporting] Generating dashboards with ALL project data...")
22
27
 
23
28
  # Generate projects landing page (index.html)
24
29
  print("\n[Reporting] Generating projects landing page...")
@@ -18,14 +18,19 @@ class EnhancedDashboardGenerator:
18
18
  self.config = config or ReportingConfig()
19
19
  self.storage = TestResultStorage(config=self.config)
20
20
 
21
- def generate(self, output_path: Path = None):
22
- """Generate enhanced dashboard HTML file."""
21
+ def generate(self, output_path: Path = None, project_name: str = None):
22
+ """Generate enhanced dashboard HTML file.
23
+
24
+ Args:
25
+ output_path: Path to save HTML file
26
+ project_name: Optional project name to filter data (None = all projects)
27
+ """
23
28
  output_path = output_path or (self.config.DASHBOARD_DIR / 'run-details.html')
24
29
  output_path.parent.mkdir(parents=True, exist_ok=True)
25
30
 
26
- # Get data
27
- latest_run_data = self._get_latest_run_with_tests()
28
- trend_data = self._get_trend_data()
31
+ # Get data - by default show all projects
32
+ latest_run_data = self._get_latest_run_with_tests(project_name=project_name)
33
+ trend_data = self._get_trend_data(project_name=project_name)
29
34
 
30
35
  # Generate HTML
31
36
  html = self._generate_html(latest_run_data, trend_data)
@@ -37,10 +42,10 @@ class EnhancedDashboardGenerator:
37
42
  print(f"[Reporting] Enhanced dashboard generated: {output_path}")
38
43
  return output_path
39
44
 
40
- def _get_latest_run_with_tests(self) -> Dict[str, Any]:
45
+ def _get_latest_run_with_tests(self, project_name: str = None) -> Dict[str, Any]:
41
46
  """Get latest run data with full test breakdown."""
42
47
  # Get latest run
43
- runs = self.storage.get_latest_runs(limit=1, project_name=self.config.PROJECT_NAME)
48
+ runs = self.storage.get_latest_runs(limit=1, project_name=project_name)
44
49
  if not runs:
45
50
  return {}
46
51
 
@@ -85,9 +90,9 @@ class EnhancedDashboardGenerator:
85
90
  'total_tests': len(test_results)
86
91
  }
87
92
 
88
- def _get_trend_data(self) -> List[Dict[str, Any]]:
93
+ def _get_trend_data(self, project_name: str = None) -> List[Dict[str, Any]]:
89
94
  """Get trend data from database."""
90
- return self.storage.get_trend_data(days=30, project_name=self.config.PROJECT_NAME)
95
+ return self.storage.get_trend_data(days=30, project_name=project_name)
91
96
 
92
97
  def _generate_html(self, latest_run_data: Dict, trend_data: List) -> str:
93
98
  """Generate complete HTML dashboard."""
@@ -16,13 +16,18 @@ class HistoryDashboardGenerator:
16
16
  self.config = config or ReportingConfig()
17
17
  self.storage = TestResultStorage(config=self.config)
18
18
 
19
- def generate(self, output_path: Path = None) -> Path:
20
- """Generate test history dashboard HTML file."""
19
+ def generate(self, output_path: Path = None, project_name: str = None) -> Path:
20
+ """Generate test history dashboard HTML file.
21
+
22
+ Args:
23
+ output_path: Path to save HTML file
24
+ project_name: Optional project name to filter data (None = all projects)
25
+ """
21
26
  output_path = output_path or (self.config.DASHBOARD_DIR / 'history.html')
22
27
  output_path.parent.mkdir(parents=True, exist_ok=True)
23
28
 
24
- # Get ALL test runs (no limit) for current project
25
- all_runs = self.storage.get_all_runs_with_details(project_name=self.config.PROJECT_NAME)
29
+ # Get ALL test runs (no limit) - by default show all projects
30
+ all_runs = self.storage.get_all_runs_with_details(project_name=project_name)
26
31
 
27
32
  # Generate HTML
28
33
  html = self._generate_html(all_runs)
@@ -26,10 +26,9 @@ class OverviewDashboardGenerator:
26
26
  output_path = output_path or (self.config.DASHBOARD_DIR / 'overview.html')
27
27
  output_path.parent.mkdir(parents=True, exist_ok=True)
28
28
 
29
- # Use project from config if not specified
30
- # Note: project_name=None means show all projects
31
- # For now, we'll generate for current project only
32
- filter_project = project_name or self.config.PROJECT_NAME
29
+ # By default, show all projects (project_name=None)
30
+ # This allows the shared database to contain data from all projects
31
+ filter_project = project_name
33
32
 
34
33
  # Get data (filtered by project)
35
34
  overall_health = self.storage.get_overall_health(project_name=filter_project)
@@ -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.3',
12
+ version='1.2.4',
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.3
3
+ Version: 1.2.4
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
@@ -139,9 +139,9 @@ test-report open
139
139
 
140
140
  ## 🎯 Multi-Project Setup
141
141
 
142
- ### **Shared Database**
142
+ ### **Shared Database Workflow**
143
143
 
144
- All projects can share one database:
144
+ All projects can share one database. Here's how it works:
145
145
 
146
146
  ```
147
147
  workspace/
@@ -150,17 +150,54 @@ workspace/
150
150
  ├── project-a/
151
151
  │ ├── tests/
152
152
  │ └── reporting.ini ← project_name = Project A
153
+ │ db_path = ../shared_test_results.db
153
154
 
154
155
  ├── project-b/
155
156
  │ ├── tests/
156
157
  │ └── reporting.ini ← project_name = Project B
158
+ │ db_path = ../shared_test_results.db
157
159
 
158
160
  └── project-c/
159
161
  ├── tests/
160
162
  └── reporting.ini ← project_name = Project C
163
+ db_path = ../shared_test_results.db
161
164
  ```
162
165
 
163
- Each project's data is tagged with its project name. The landing page shows all projects.
166
+ ### **How It Works:**
167
+
168
+ 1. **Running Tests** - Each project stores its test results in the shared database:
169
+ ```bash
170
+ cd project-a
171
+ pytest # Stores results tagged with "Project A"
172
+
173
+ cd ../project-b
174
+ pytest # Stores results tagged with "Project B"
175
+ ```
176
+
177
+ 2. **Generating Dashboards** - Run from ANY project to generate dashboards with ALL data:
178
+ ```bash
179
+ cd project-a
180
+ test-report generate # Pulls ALL projects from shared DB
181
+ ```
182
+
183
+ The `generate` command:
184
+ - ✅ Reads ALL project data from the shared database
185
+ - ✅ Generates a projects landing page showing all projects
186
+ - ✅ Creates overview, history, and run-details dashboards
187
+ - ✅ Data from all projects is preserved and accessible
188
+
189
+ 3. **Viewing Results** - The dashboards show aggregated data:
190
+ - **Projects Landing Page** (`index.html`) - Lists all projects with health scores
191
+ - **Overview Dashboard** (`overview.html`) - Shows metrics across all projects
192
+ - **History Dashboard** (`history.html`) - All test runs from all projects
193
+ - **Run Details** (`run-details.html`) - Latest run details
194
+
195
+ ### **Key Benefits:**
196
+
197
+ - 🔄 **Data Persistence** - Running `test-report generate` from one project doesn't lose data from other projects
198
+ - 📊 **Centralized View** - See all your test projects in one place
199
+ - 🎯 **Project Filtering** - Dashboards support filtering by project (future enhancement)
200
+ - 🔒 **Concurrent Safe** - Multiple projects can run tests simultaneously
164
201
 
165
202
  ---
166
203
 
File without changes
File without changes