cli-test-framework 0.3.2__tar.gz → 0.3.3__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 (61) hide show
  1. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/CHANGELOG.md +14 -2
  2. cli_test_framework-0.3.3/PKG-INFO +508 -0
  3. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/README.md +2 -2
  4. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/docs/user_manual.md +1 -1
  5. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/setup.py +7 -7
  6. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/__init__.py +1 -1
  7. cli_test_framework-0.3.3/src/cli_test_framework.egg-info/PKG-INFO +508 -0
  8. cli_test_framework-0.3.2/PKG-INFO +0 -546
  9. cli_test_framework-0.3.2/src/cli_test_framework.egg-info/PKG-INFO +0 -546
  10. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/MANIFEST.in +0 -0
  11. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/pyproject.toml +0 -0
  12. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/setup.cfg +0 -0
  13. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/cli.py +0 -0
  14. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/commands/__init__.py +0 -0
  15. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/commands/compare.py +0 -0
  16. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/core/__init__.py +0 -0
  17. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/core/assertions.py +0 -0
  18. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/core/base_runner.py +0 -0
  19. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/core/parallel_runner.py +0 -0
  20. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/core/process_worker.py +0 -0
  21. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/core/setup.py +0 -0
  22. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/core/test_case.py +0 -0
  23. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/__init__.py +0 -0
  24. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/base_comparator.py +0 -0
  25. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/binary_comparator.py +0 -0
  26. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/csv_comparator.py +0 -0
  27. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/factory.py +0 -0
  28. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/h5_comparator.py +0 -0
  29. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/json_comparator.py +0 -0
  30. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/result.py +0 -0
  31. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/text_comparator.py +0 -0
  32. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/xml_comparator.py +0 -0
  33. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/runners/__init__.py +0 -0
  34. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/runners/json_runner.py +0 -0
  35. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/runners/parallel_json_runner.py +0 -0
  36. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/runners/yaml_runner.py +0 -0
  37. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/utils/__init__.py +0 -0
  38. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/utils/path_resolver.py +0 -0
  39. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework/utils/report_generator.py +0 -0
  40. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework.egg-info/SOURCES.txt +0 -0
  41. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework.egg-info/dependency_links.txt +0 -0
  42. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework.egg-info/entry_points.txt +0 -0
  43. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework.egg-info/requires.txt +0 -0
  44. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/src/cli_test_framework.egg-info/top_level.txt +0 -0
  45. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/tests/__init__.py +0 -0
  46. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/tests/__pycache__/__init__.cpython-312.pyc +0 -0
  47. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/tests/__pycache__/test_parallel_runner.cpython-312-pytest-7.4.4.pyc +0 -0
  48. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/tests/__pycache__/test_setup_module.cpython-312-pytest-7.4.4.pyc +0 -0
  49. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/tests/fixtures/test_cases.json +0 -0
  50. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/tests/fixtures/test_cases.yaml +0 -0
  51. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/tests/fixtures/test_cases1.json +0 -0
  52. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/tests/fixtures/test_with_setup.json +0 -0
  53. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/tests/fixtures/test_with_setup.yaml +0 -0
  54. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/tests/performance_test.py +0 -0
  55. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/tests/test1.py +0 -0
  56. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/tests/test_comprehensive_space.py +0 -0
  57. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/tests/test_parallel_runner.py +0 -0
  58. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/tests/test_parallel_space.py +0 -0
  59. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/tests/test_report.txt +0 -0
  60. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/tests/test_runners.py +0 -0
  61. {cli_test_framework-0.3.2 → cli_test_framework-0.3.3}/tests/test_setup_module.py +0 -0
@@ -1,6 +1,18 @@
1
1
  # 变更日志
2
2
 
3
- ## [v0.3.2] - 2024-12-29
3
+ ## [v0.3.3] - 2025-06-09
4
+
5
+ ### 🔧 项目信息更新
6
+ - **GitHub仓库更新**:更新项目仓库地址为 https://github.com/ozil111/cli-test-framework
7
+ - **PyPI主页优化**:恢复使用README.md作为PyPI项目主页描述,更适合对外展示
8
+ - **文档链接调整**:用户手册通过Documentation链接访问,结构更加清晰
9
+
10
+ ### 📚 链接修复
11
+ - 更新所有文档中的GitHub仓库链接
12
+ - 修正PyPI项目的Documentation链接指向
13
+ - 改善文档访问体验和项目结构
14
+
15
+ ## [v0.3.2] - 2024-06-09
4
16
 
5
17
  ### 🔧 重大改进
6
18
  - **PyPI文档更新**:PyPI项目页面现在显示完整的用户手册内容(包含Setup模块文档)
@@ -13,7 +25,7 @@
13
25
  - 增加了指向完整用户手册的链接和说明
14
26
  - 改善了文档结构和可读性
15
27
 
16
- ## [v0.3.1] - 2024-12-29
28
+ ## [v0.3.1] - 2024-06-08
17
29
 
18
30
  ### 🔧 改进
19
31
  - **文档更新**:完善了用户手册中的Setup模块文档
@@ -0,0 +1,508 @@
1
+ Metadata-Version: 2.4
2
+ Name: cli-test-framework
3
+ Version: 0.3.3
4
+ Summary: A powerful command line testing framework in Python with setup modules, parallel execution, and file comparison capabilities.
5
+ Home-page: https://github.com/ozil111/cli-test-framework
6
+ Author: Xiaotong Wang
7
+ Author-email: xiaotongwang98@gmail.com
8
+ Project-URL: Documentation, https://github.com/ozil111/cli-test-framework/blob/main/docs/user_manual.md
9
+ Project-URL: Source, https://github.com/ozil111/cli-test-framework
10
+ Project-URL: Tracker, https://github.com/ozil111/cli-test-framework/issues
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Topic :: Software Development :: Testing
17
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
+ Requires-Python: >=3.9
19
+ Description-Content-Type: text/markdown
20
+ Requires-Dist: dukpy==0.5.0
21
+ Requires-Dist: h5py>=3.8.0
22
+ Requires-Dist: numpy>=2.0.1
23
+ Requires-Dist: setuptools>=75.8.0
24
+ Requires-Dist: wheel>=0.45.1
25
+ Dynamic: author
26
+ Dynamic: author-email
27
+ Dynamic: classifier
28
+ Dynamic: description
29
+ Dynamic: description-content-type
30
+ Dynamic: home-page
31
+ Dynamic: project-url
32
+ Dynamic: requires-dist
33
+ Dynamic: requires-python
34
+ Dynamic: summary
35
+
36
+ # CLI Testing Framework
37
+
38
+ ## 1. Overview
39
+
40
+ This is a lightweight and extensible automated testing framework that supports defining test cases via JSON/YAML formats, providing complete test execution, result verification, and report generation capabilities. The framework is designed to provide standardized test management for command-line tools and scripts, with enterprise-grade parallel execution support and advanced file comparison features.
41
+
42
+ ## 2. Features
43
+
44
+ - **🚀 Parallel Test Execution**: Support for multi-threading and multi-processing parallel testing with significant performance improvements
45
+ - **🔧 Setup Module System**: Plugin-based architecture for pre-test setup tasks (environment variables, database initialization, service startup)
46
+ - **🏗️ Modular Architecture**: Decoupled design of core components (runner/assertion/report/setup)
47
+ - **📄 Multi-Format Support**: Native support for JSON/YAML test case formats
48
+ - **🧠 Intelligent Command Parsing**: Smart handling of complex commands like `"python ./script.py"`
49
+ - **📁 Smart Path Resolution**: Automatic handling of relative and absolute path conversions
50
+ - **✅ Rich Assertion Mechanism**: Return code validation, output content matching, regex verification
51
+ - **🔌 Extensible Interfaces**: Quickly implement new test format support by inheriting BaseRunner
52
+ - **🔒 Isolated Execution Environment**: Independent sub-process execution ensures test isolation
53
+ - **📊 Comprehensive Reports**: Detailed pass rate statistics and failure diagnostics
54
+ - **🔧 Thread-Safe Design**: Robust concurrent execution with proper synchronization
55
+ - **📝 Advanced File Comparison**: Support for comparing various file types (text, binary, JSON, HDF5) with detailed diff output
56
+
57
+ ## 3. Quick Start
58
+
59
+ ### Environment Requirements
60
+
61
+ ```bash
62
+ pip install cli-test-framework
63
+ Python >= 3.6
64
+ ```
65
+
66
+ ### Sequential Execution
67
+
68
+ ```python
69
+ from src.runners.json_runner import JSONRunner
70
+
71
+ runner = JSONRunner(
72
+ config_file="path/to/test_cases.json",
73
+ workspace="/project/root"
74
+ )
75
+ success = runner.run_tests()
76
+ ```
77
+
78
+ ### Parallel Execution
79
+
80
+ ```python
81
+ from src.runners.parallel_json_runner import ParallelJSONRunner
82
+
83
+ # Multi-threaded execution (recommended for I/O-intensive tests)
84
+ runner = ParallelJSONRunner(
85
+ config_file="path/to/test_cases.json",
86
+ workspace="/project/root",
87
+ max_workers=4, # Maximum concurrent workers
88
+ execution_mode="thread" # "thread" or "process"
89
+ )
90
+ success = runner.run_tests()
91
+ ```
92
+
93
+ ### Setup Module Usage
94
+
95
+ ```python
96
+ from cli_test_framework import JSONRunner, EnvironmentSetup
97
+
98
+ # Using built-in environment variable setup
99
+ runner = JSONRunner("test_cases.json")
100
+ env_setup = EnvironmentSetup({
101
+ "TEST_ENV": "development",
102
+ "API_URL": "http://localhost:8080"
103
+ })
104
+ runner.setup_manager.add_setup(env_setup)
105
+ success = runner.run_tests()
106
+ ```
107
+
108
+ ### File Comparison
109
+
110
+ ```bash
111
+ # Compare two text files
112
+ compare-files file1.txt file2.txt
113
+
114
+ # Compare JSON files with key-based comparison
115
+ compare-files data1.json data2.json --json-compare-mode key-based --json-key-field id
116
+
117
+ # Compare HDF5 files with specific options
118
+ compare-files data1.h5 data2.h5 --h5-table table1,table2 --h5-rtol 1e-6
119
+
120
+ # Compare binary files with similarity check
121
+ compare-files binary1.bin binary2.bin --similarity
122
+ ```
123
+
124
+ ## 4. Test Case Format
125
+
126
+ ### JSON Format
127
+
128
+ ```json
129
+ {
130
+ "setup": {
131
+ "environment_variables": {
132
+ "TEST_ENV": "development",
133
+ "API_URL": "http://localhost:8080",
134
+ "DEBUG_MODE": "true"
135
+ }
136
+ },
137
+ "test_cases": [
138
+ {
139
+ "name": "Environment Variable Test",
140
+ "command": "python",
141
+ "args": ["-c", "import os; print(f'Environment: {os.environ.get(\"TEST_ENV\")}')"],
142
+ "expected": {
143
+ "return_code": 0,
144
+ "output_contains": ["Environment: development"]
145
+ }
146
+ },
147
+ {
148
+ "name": "File Comparison Test",
149
+ "command": "compare-files",
150
+ "args": ["file1.txt", "file2.txt", "--verbose"],
151
+ "expected": {
152
+ "return_code": 0,
153
+ "output_contains": ["Files are identical"],
154
+ "output_matches": [".*comparison completed.*"]
155
+ }
156
+ }
157
+ ]
158
+ }
159
+ ```
160
+
161
+ ### YAML Format
162
+
163
+ ```yaml
164
+ setup:
165
+ environment_variables:
166
+ TEST_ENV: "production"
167
+ DATABASE_URL: "sqlite:///test.db"
168
+
169
+ test_cases:
170
+ - name: Environment Test
171
+ command: python
172
+ args:
173
+ - "-c"
174
+ - "import os; print(f'DB: {os.environ.get(\"DATABASE_URL\")}')"
175
+ expected:
176
+ return_code: 0
177
+ output_contains:
178
+ - "DB: sqlite:///test.db"
179
+
180
+ - name: Directory Scan Test
181
+ command: ls
182
+ args:
183
+ - -l
184
+ - docs/
185
+ expected:
186
+ return_code: 0
187
+ output_matches: ".*\\.md$"
188
+ ```
189
+
190
+ ## 5. File Comparison Features
191
+
192
+ ### Supported File Types
193
+
194
+ - **Text Files**: Plain text, source code, markdown, etc.
195
+ - **JSON Files**: With exact or key-based comparison
196
+ - **HDF5 Files**: Structure and content comparison with numerical tolerance
197
+ - **Binary Files**: With optional similarity index calculation
198
+
199
+ ### Comparison Options
200
+
201
+ #### Text Comparison
202
+ ```bash
203
+ compare-files file1.txt file2.txt \
204
+ --start-line 10 \
205
+ --end-line 20 \
206
+ --encoding utf-8
207
+ ```
208
+
209
+ #### JSON Comparison
210
+ ```bash
211
+ compare-files data1.json data2.json \
212
+ --json-compare-mode key-based \
213
+ --json-key-field id,name
214
+ ```
215
+
216
+ #### HDF5 Comparison
217
+ ```bash
218
+ compare-files data1.h5 data2.h5 \
219
+ --h5-table table1,table2 \
220
+ --h5-structure-only \
221
+ --h5-rtol 1e-5 \
222
+ --h5-atol 1e-8
223
+ ```
224
+
225
+ #### Binary Comparison
226
+ ```bash
227
+ compare-files binary1.bin binary2.bin \
228
+ --similarity \
229
+ --chunk-size 16384
230
+ ```
231
+
232
+ ### Output Formats
233
+
234
+ - **Text**: Human-readable diff output
235
+ - **JSON**: Structured comparison results
236
+ - **HTML**: Visual diff with syntax highlighting
237
+
238
+ ## 6. System Architecture
239
+
240
+ ### Enhanced Architecture Flow
241
+
242
+ ```mermaid
243
+ graph TD
244
+ A[Test Cases] --> B{Execution Mode}
245
+ B -->|Sequential| C[JSONRunner/YAMLRunner]
246
+ B -->|Parallel| D[ParallelRunner]
247
+ D --> E[ThreadPoolExecutor/ProcessPoolExecutor]
248
+ C --> F[Command Parser]
249
+ E --> F
250
+ F --> G[Path Resolver]
251
+ G --> H[Sub-process Execution]
252
+ H --> I[Assertion Engine]
253
+ I --> J[Thread-Safe Result Collection]
254
+ J --> K[Report Generator]
255
+ L[File Comparator] --> M[Text Comparator]
256
+ L --> N[JSON Comparator]
257
+ L --> O[HDF5 Comparator]
258
+ L --> P[Binary Comparator]
259
+ ```
260
+
261
+ ### Core Components
262
+
263
+ #### 1. Intelligent Command Parser
264
+ ```python
265
+ # Handles complex commands like "python ./script.py"
266
+ command_parts = case["command"].split()
267
+ if len(command_parts) > 1:
268
+ actual_command = resolve_command(command_parts[0]) # "python"
269
+ script_parts = resolve_paths(command_parts[1:]) # "./script.py" -> full path
270
+ final_command = f"{actual_command} {' '.join(script_parts)}"
271
+ ```
272
+
273
+ #### 2. Enhanced Path Resolver
274
+ ```python
275
+ def resolve_command(self, command: str) -> str:
276
+ system_commands = {
277
+ 'echo', 'ping', 'python', 'node', 'java', 'docker', ...
278
+ }
279
+ if command in system_commands or Path(command).is_absolute():
280
+ return command
281
+ return str(self.workspace / command)
282
+ ```
283
+
284
+ #### 3. Parallel Runner Base Class
285
+ ```python
286
+ class ParallelRunner(BaseRunner):
287
+ def __init__(self, max_workers=None, execution_mode="thread"):
288
+ self.max_workers = max_workers or os.cpu_count()
289
+ self.execution_mode = execution_mode
290
+ self._results_lock = threading.Lock()
291
+ self._print_lock = threading.Lock()
292
+ ```
293
+
294
+ ## 7. Advanced Usage
295
+
296
+ ### Performance Testing
297
+
298
+ ```python
299
+ # Quick performance test
300
+ python performance_test.py
301
+
302
+ # Unit tests for parallel functionality
303
+ python -m pytest tests/test_parallel_runner.py -v
304
+ ```
305
+
306
+ ### Error Handling and Fallback
307
+
308
+ ```python
309
+ try:
310
+ runner = ParallelJSONRunner(config_file="test_cases.json")
311
+ success = runner.run_tests()
312
+
313
+ if not success:
314
+ # Check failed tests
315
+ for detail in runner.results["details"]:
316
+ if detail["status"] == "failed":
317
+ print(f"Failed test: {detail['name']}")
318
+ print(f"Error: {detail['message']}")
319
+
320
+ except Exception as e:
321
+ print(f"Execution error: {e}")
322
+ # Fallback to sequential execution
323
+ runner.run_tests_sequential()
324
+ ```
325
+
326
+ ### Best Practices
327
+
328
+ 1. **Choose Appropriate Concurrency**:
329
+ ```python
330
+ import os
331
+
332
+ # For CPU-intensive tasks
333
+ max_workers = os.cpu_count()
334
+
335
+ # For I/O-intensive tasks
336
+ max_workers = os.cpu_count() * 2
337
+ ```
338
+
339
+ 2. **Test Case Design**:
340
+ - ✅ Ensure test independence (no dependencies between tests)
341
+ - ✅ Avoid shared resource conflicts (different files/ports)
342
+ - ✅ Use relative paths (framework handles resolution automatically)
343
+
344
+ 3. **Debugging**:
345
+ ```python
346
+ # Enable verbose output for debugging
347
+ runner = ParallelJSONRunner(
348
+ config_file="test_cases.json",
349
+ max_workers=1, # Set to 1 for easier debugging
350
+ execution_mode="thread"
351
+ )
352
+ ```
353
+
354
+ ## 8. Example Demonstrations
355
+
356
+ ### Input Example
357
+
358
+ ```json
359
+ {
360
+ "test_cases": [
361
+ {
362
+ "name": "Python Version Check",
363
+ "command": "python --version",
364
+ "args": [],
365
+ "expected": {
366
+ "output_matches": "Python 3\\.[89]\\.",
367
+ "return_code": 0
368
+ }
369
+ },
370
+ {
371
+ "name": "File Processing Test",
372
+ "command": "python ./process_file.py",
373
+ "args": ["input.txt", "--output", "result.txt"],
374
+ "expected": {
375
+ "return_code": 0,
376
+ "output_contains": ["Processing completed"]
377
+ }
378
+ }
379
+ ]
380
+ }
381
+ ```
382
+
383
+ ### Output Report
384
+
385
+ ```
386
+ Test Results Summary:
387
+ Total Tests: 15
388
+ Passed: 15
389
+ Failed: 0
390
+
391
+ Performance Statistics:
392
+ Sequential execution time: 12.45 seconds
393
+ Parallel execution time: 3.21 seconds
394
+ Speedup ratio: 3.88x
395
+
396
+ Detailed Results:
397
+ ✓ Python Version Check
398
+ ✓ File Processing Test
399
+ ✓ JSON Comparison Test
400
+ ...
401
+ ```
402
+
403
+ ## 9. Troubleshooting
404
+
405
+ ### Common Issues
406
+
407
+ 1. **Process Mode Serialization Error**
408
+ - **Cause**: Objects contain non-serializable attributes (like locks)
409
+ - **Solution**: Use independent process worker functions
410
+
411
+ 2. **Path Resolution Error**
412
+ - **Cause**: System commands treated as relative paths
413
+ - **Solution**: Update `PathResolver` system command list
414
+
415
+ 3. **Performance Not Improved**
416
+ - **Cause**: Test cases too short, parallel overhead exceeds benefits
417
+ - **Solution**: Increase test case count or use more complex tests
418
+
419
+ 4. **Command Not Found Error**
420
+ - **Cause**: Complex commands like `"python ./script.py"` not parsed correctly
421
+ - **Solution**: Framework now automatically handles this (fixed in latest version)
422
+
423
+ ### Debug Tips
424
+
425
+ ```python
426
+ # Enable detailed logging
427
+ import logging
428
+ logging.basicConfig(level=logging.DEBUG)
429
+
430
+ # Check detailed results
431
+ import json
432
+ print(json.dumps(runner.results, indent=2, ensure_ascii=False))
433
+ ```
434
+
435
+ ## 10. Extension and Customization
436
+
437
+ ### Adding New Runners
438
+
439
+ ```python
440
+ class XMLRunner(BaseRunner):
441
+ def load_test_cases(self):
442
+ import xml.etree.ElementTree as ET
443
+ # Parse XML structure and convert to TestCase objects
444
+
445
+ class CustomParallelRunner(ParallelRunner):
446
+ def custom_preprocessing(self):
447
+ # Add custom logic before test execution
448
+ pass
449
+ ```
450
+
451
+ ### Custom Assertions
452
+
453
+ ```python
454
+ class CustomAssertions(Assertions):
455
+ @staticmethod
456
+ def performance_threshold(execution_time, max_time):
457
+ if execution_time > max_time:
458
+ raise AssertionError(f"Execution too slow: {execution_time}s > {max_time}s")
459
+ ```
460
+
461
+ ## 11. Version Compatibility
462
+
463
+ - **Python Version**: 3.6+
464
+ - **Dependencies**: Standard library only (no external dependencies for core functionality)
465
+ - **Backward Compatibility**: Fully compatible with existing `JSONRunner` code
466
+ - **Platform Support**: Windows, macOS, Linux
467
+
468
+ ## 12. Performance Benchmarks
469
+
470
+ | Test Scenario | Sequential | Parallel (Thread) | Parallel (Process) | Speedup |
471
+ |---------------|------------|-------------------|-------------------|---------|
472
+ | 10 I/O tests | 5.2s | 1.4s | 2.1s | 3.7x |
473
+ | 20 CPU tests | 12.8s | 8.9s | 6.2s | 2.1x |
474
+ | Mixed tests | 8.5s | 2.3s | 3.1s | 3.7x |
475
+
476
+ ## 13. Contributing
477
+
478
+ 1. Fork the repository
479
+ 2. Create a feature branch
480
+ 3. Add tests for new functionality
481
+ 4. Ensure all tests pass: `python -m pytest tests/ -v`
482
+ 5. Submit a pull request
483
+
484
+ ## 14. License
485
+
486
+ This project is licensed under the MIT License - see the LICENSE file for details.
487
+
488
+ ---
489
+
490
+ ## 📚 Complete Documentation
491
+
492
+ For comprehensive documentation including detailed Setup Module guide, API reference, and advanced usage examples, see:
493
+
494
+ **[📖 Complete User Manual](https://github.com/ozil111/cli-test-framework/blob/main/docs/user_manual.md)**
495
+
496
+ The user manual includes:
497
+ - 🔧 **Setup Module**: Complete guide for environment variables and custom plugins
498
+ - 🚀 **Parallel Testing**: Advanced parallel execution strategies
499
+ - 📁 **File Comparison**: Detailed comparison capabilities for all file types
500
+ - 🔌 **API Reference**: Full API documentation and examples
501
+ - 🛠️ **Troubleshooting**: Common issues and solutions
502
+ - 📝 **Best Practices**: Recommended patterns and configurations
503
+
504
+ ---
505
+
506
+ **🚀 Ready to supercharge your testing workflow with setup modules, parallel execution and advanced file comparison!**
507
+
508
+ For detailed parallel testing guide, see: [PARALLEL_TESTING_GUIDE.md](https://github.com/ozil111/cli-test-framework/blob/main/PARALLEL_TESTING_GUIDE.md)
@@ -456,7 +456,7 @@ This project is licensed under the MIT License - see the LICENSE file for detail
456
456
 
457
457
  For comprehensive documentation including detailed Setup Module guide, API reference, and advanced usage examples, see:
458
458
 
459
- **[📖 Complete User Manual](docs/user_manual.md)**
459
+ **[📖 Complete User Manual](https://github.com/ozil111/cli-test-framework/blob/main/docs/user_manual.md)**
460
460
 
461
461
  The user manual includes:
462
462
  - 🔧 **Setup Module**: Complete guide for environment variables and custom plugins
@@ -470,4 +470,4 @@ The user manual includes:
470
470
 
471
471
  **🚀 Ready to supercharge your testing workflow with setup modules, parallel execution and advanced file comparison!**
472
472
 
473
- For detailed parallel testing guide, see: [PARALLEL_TESTING_GUIDE.md](PARALLEL_TESTING_GUIDE.md)
473
+ For detailed parallel testing guide, see: [PARALLEL_TESTING_GUIDE.md](https://github.com/ozil111/cli-test-framework/blob/main/PARALLEL_TESTING_GUIDE.md)
@@ -37,7 +37,7 @@ pip install cli-test-framework
37
37
 
38
38
  ### Development Installation
39
39
  ```bash
40
- git clone https://github.com/yourusername/cli-test-framework.git
40
+ git clone https://github.com/ozil111/cli-test-framework.git
41
41
  cd cli-test-framework
42
42
  pip install -e .
43
43
  ```
@@ -1,20 +1,20 @@
1
1
  from setuptools import setup, find_packages
2
2
  import os
3
3
 
4
- # Read the contents of the user manual file
4
+ # Read the contents of the README file
5
5
  this_directory = os.path.abspath(os.path.dirname(__file__))
6
- with open(os.path.join(this_directory, 'docs', 'user_manual.md'), encoding='utf-8') as f:
6
+ with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
7
7
  long_description = f.read()
8
8
 
9
9
  setup(
10
10
  name="cli-test-framework",
11
- version="0.3.2",
11
+ version="0.3.3",
12
12
  author="Xiaotong Wang",
13
13
  author_email="xiaotongwang98@gmail.com",
14
14
  description="A powerful command line testing framework in Python with setup modules, parallel execution, and file comparison capabilities.",
15
15
  long_description=long_description,
16
16
  long_description_content_type="text/markdown",
17
- url="https://github.com/yourusername/cli-test-framework",
17
+ url="https://github.com/ozil111/cli-test-framework",
18
18
  packages=find_packages(where="src"),
19
19
  package_dir={"": "src"},
20
20
  install_requires=[
@@ -41,8 +41,8 @@ setup(
41
41
  ],
42
42
  python_requires='>=3.9',
43
43
  project_urls={
44
- 'Documentation': 'https://github.com/yourusername/cli-test-framework/docs/user_manual.md',
45
- 'Source': 'https://github.com/yourusername/cli-test-framework',
46
- 'Tracker': 'https://github.com/yourusername/cli-test-framework/issues',
44
+ 'Documentation': 'https://github.com/ozil111/cli-test-framework/blob/main/docs/user_manual.md',
45
+ 'Source': 'https://github.com/ozil111/cli-test-framework',
46
+ 'Tracker': 'https://github.com/ozil111/cli-test-framework/issues',
47
47
  },
48
48
  )
@@ -5,7 +5,7 @@ This package provides tools for testing command-line applications and scripts
5
5
  with support for parallel execution and advanced file comparison capabilities.
6
6
  """
7
7
 
8
- __version__ = "0.3.2"
8
+ __version__ = "0.3.3"
9
9
  __author__ = "Xiaotong Wang"
10
10
  __email__ = "xiaotongwang98@gmail.com"
11
11