cli-test-framework 0.3.1__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 (59) hide show
  1. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/CHANGELOG.md +26 -1
  2. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/PKG-INFO +72 -9
  3. cli_test_framework-0.3.1/src/cli_test_framework.egg-info/PKG-INFO → cli_test_framework-0.3.3/README.md +67 -39
  4. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/docs/user_manual.md +1 -1
  5. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/setup.py +5 -5
  6. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/__init__.py +1 -1
  7. cli_test_framework-0.3.1/README.md → cli_test_framework-0.3.3/src/cli_test_framework.egg-info/PKG-INFO +102 -4
  8. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/MANIFEST.in +0 -0
  9. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/pyproject.toml +0 -0
  10. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/setup.cfg +0 -0
  11. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/cli.py +0 -0
  12. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/commands/__init__.py +0 -0
  13. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/commands/compare.py +0 -0
  14. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/core/__init__.py +0 -0
  15. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/core/assertions.py +0 -0
  16. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/core/base_runner.py +0 -0
  17. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/core/parallel_runner.py +0 -0
  18. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/core/process_worker.py +0 -0
  19. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/core/setup.py +0 -0
  20. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/core/test_case.py +0 -0
  21. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/__init__.py +0 -0
  22. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/base_comparator.py +0 -0
  23. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/binary_comparator.py +0 -0
  24. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/csv_comparator.py +0 -0
  25. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/factory.py +0 -0
  26. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/h5_comparator.py +0 -0
  27. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/json_comparator.py +0 -0
  28. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/result.py +0 -0
  29. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/text_comparator.py +0 -0
  30. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/file_comparator/xml_comparator.py +0 -0
  31. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/runners/__init__.py +0 -0
  32. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/runners/json_runner.py +0 -0
  33. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/runners/parallel_json_runner.py +0 -0
  34. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/runners/yaml_runner.py +0 -0
  35. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/utils/__init__.py +0 -0
  36. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/utils/path_resolver.py +0 -0
  37. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework/utils/report_generator.py +0 -0
  38. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework.egg-info/SOURCES.txt +0 -0
  39. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework.egg-info/dependency_links.txt +0 -0
  40. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework.egg-info/entry_points.txt +0 -0
  41. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework.egg-info/requires.txt +0 -0
  42. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/src/cli_test_framework.egg-info/top_level.txt +0 -0
  43. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/tests/__init__.py +0 -0
  44. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/tests/__pycache__/__init__.cpython-312.pyc +0 -0
  45. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/tests/__pycache__/test_parallel_runner.cpython-312-pytest-7.4.4.pyc +0 -0
  46. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/tests/__pycache__/test_setup_module.cpython-312-pytest-7.4.4.pyc +0 -0
  47. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/tests/fixtures/test_cases.json +0 -0
  48. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/tests/fixtures/test_cases.yaml +0 -0
  49. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/tests/fixtures/test_cases1.json +0 -0
  50. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/tests/fixtures/test_with_setup.json +0 -0
  51. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/tests/fixtures/test_with_setup.yaml +0 -0
  52. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/tests/performance_test.py +0 -0
  53. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/tests/test1.py +0 -0
  54. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/tests/test_comprehensive_space.py +0 -0
  55. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/tests/test_parallel_runner.py +0 -0
  56. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/tests/test_parallel_space.py +0 -0
  57. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/tests/test_report.txt +0 -0
  58. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/tests/test_runners.py +0 -0
  59. {cli_test_framework-0.3.1 → cli_test_framework-0.3.3}/tests/test_setup_module.py +0 -0
@@ -1,6 +1,31 @@
1
1
  # 变更日志
2
2
 
3
- ## [v0.3.1] - 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
16
+
17
+ ### 🔧 重大改进
18
+ - **PyPI文档更新**:PyPI项目页面现在显示完整的用户手册内容(包含Setup模块文档)
19
+ - **README重构**:更新README.md添加Setup模块使用示例和配置说明
20
+ - **文档源切换**:setup.py现在使用`docs/user_manual.md`作为PyPI项目描述
21
+
22
+ ### 📚 文档增强
23
+ - 在README中添加了Setup模块的快速使用示例
24
+ - 添加了带环境变量配置的JSON/YAML示例
25
+ - 增加了指向完整用户手册的链接和说明
26
+ - 改善了文档结构和可读性
27
+
28
+ ## [v0.3.1] - 2024-06-08
4
29
 
5
30
  ### 🔧 改进
6
31
  - **文档更新**:完善了用户手册中的Setup模块文档
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cli-test-framework
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
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/yourusername/cli-test-framework
5
+ Home-page: https://github.com/ozil111/cli-test-framework
6
6
  Author: Xiaotong Wang
7
7
  Author-email: xiaotongwang98@gmail.com
8
- Project-URL: Documentation, https://github.com/yourusername/cli-test-framework/docs/user_manual.md
9
- Project-URL: Source, https://github.com/yourusername/cli-test-framework
10
- Project-URL: Tracker, https://github.com/yourusername/cli-test-framework/issues
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
11
  Classifier: Programming Language :: Python :: 3
12
12
  Classifier: License :: OSI Approved :: MIT License
13
13
  Classifier: Operating System :: OS Independent
@@ -42,7 +42,8 @@ This is a lightweight and extensible automated testing framework that supports d
42
42
  ## 2. Features
43
43
 
44
44
  - **🚀 Parallel Test Execution**: Support for multi-threading and multi-processing parallel testing with significant performance improvements
45
- - **🏗️ Modular Architecture**: Decoupled design of core components (runner/assertion/report)
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)
46
47
  - **📄 Multi-Format Support**: Native support for JSON/YAML test case formats
47
48
  - **🧠 Intelligent Command Parsing**: Smart handling of complex commands like `"python ./script.py"`
48
49
  - **📁 Smart Path Resolution**: Automatic handling of relative and absolute path conversions
@@ -89,6 +90,21 @@ runner = ParallelJSONRunner(
89
90
  success = runner.run_tests()
90
91
  ```
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
+
92
108
  ### File Comparison
93
109
 
94
110
  ```bash
@@ -111,9 +127,25 @@ compare-files binary1.bin binary2.bin --similarity
111
127
 
112
128
  ```json
113
129
  {
130
+ "setup": {
131
+ "environment_variables": {
132
+ "TEST_ENV": "development",
133
+ "API_URL": "http://localhost:8080",
134
+ "DEBUG_MODE": "true"
135
+ }
136
+ },
114
137
  "test_cases": [
115
138
  {
116
- "name": "File Comparison Test",
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",
117
149
  "command": "compare-files",
118
150
  "args": ["file1.txt", "file2.txt", "--verbose"],
119
151
  "expected": {
@@ -129,7 +161,22 @@ compare-files binary1.bin binary2.bin --similarity
129
161
  ### YAML Format
130
162
 
131
163
  ```yaml
164
+ setup:
165
+ environment_variables:
166
+ TEST_ENV: "production"
167
+ DATABASE_URL: "sqlite:///test.db"
168
+
132
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
+
133
180
  - name: Directory Scan Test
134
181
  command: ls
135
182
  args:
@@ -440,6 +487,22 @@ This project is licensed under the MIT License - see the LICENSE file for detail
440
487
 
441
488
  ---
442
489
 
443
- **🚀 Ready to supercharge your testing workflow with parallel execution and advanced file comparison!**
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!**
444
507
 
445
- For detailed parallel testing guide, see: [PARALLEL_TESTING_GUIDE.md](PARALLEL_TESTING_GUIDE.md)
508
+ For detailed parallel testing guide, see: [PARALLEL_TESTING_GUIDE.md](https://github.com/ozil111/cli-test-framework/blob/main/PARALLEL_TESTING_GUIDE.md)
@@ -1,38 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: cli-test-framework
3
- Version: 0.3.1
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/yourusername/cli-test-framework
6
- Author: Xiaotong Wang
7
- Author-email: xiaotongwang98@gmail.com
8
- Project-URL: Documentation, https://github.com/yourusername/cli-test-framework/docs/user_manual.md
9
- Project-URL: Source, https://github.com/yourusername/cli-test-framework
10
- Project-URL: Tracker, https://github.com/yourusername/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
1
  # CLI Testing Framework
37
2
 
38
3
  ## 1. Overview
@@ -42,7 +7,8 @@ This is a lightweight and extensible automated testing framework that supports d
42
7
  ## 2. Features
43
8
 
44
9
  - **🚀 Parallel Test Execution**: Support for multi-threading and multi-processing parallel testing with significant performance improvements
45
- - **🏗️ Modular Architecture**: Decoupled design of core components (runner/assertion/report)
10
+ - **🔧 Setup Module System**: Plugin-based architecture for pre-test setup tasks (environment variables, database initialization, service startup)
11
+ - **🏗️ Modular Architecture**: Decoupled design of core components (runner/assertion/report/setup)
46
12
  - **📄 Multi-Format Support**: Native support for JSON/YAML test case formats
47
13
  - **🧠 Intelligent Command Parsing**: Smart handling of complex commands like `"python ./script.py"`
48
14
  - **📁 Smart Path Resolution**: Automatic handling of relative and absolute path conversions
@@ -89,6 +55,21 @@ runner = ParallelJSONRunner(
89
55
  success = runner.run_tests()
90
56
  ```
91
57
 
58
+ ### Setup Module Usage
59
+
60
+ ```python
61
+ from cli_test_framework import JSONRunner, EnvironmentSetup
62
+
63
+ # Using built-in environment variable setup
64
+ runner = JSONRunner("test_cases.json")
65
+ env_setup = EnvironmentSetup({
66
+ "TEST_ENV": "development",
67
+ "API_URL": "http://localhost:8080"
68
+ })
69
+ runner.setup_manager.add_setup(env_setup)
70
+ success = runner.run_tests()
71
+ ```
72
+
92
73
  ### File Comparison
93
74
 
94
75
  ```bash
@@ -111,9 +92,25 @@ compare-files binary1.bin binary2.bin --similarity
111
92
 
112
93
  ```json
113
94
  {
95
+ "setup": {
96
+ "environment_variables": {
97
+ "TEST_ENV": "development",
98
+ "API_URL": "http://localhost:8080",
99
+ "DEBUG_MODE": "true"
100
+ }
101
+ },
114
102
  "test_cases": [
115
103
  {
116
- "name": "File Comparison Test",
104
+ "name": "Environment Variable Test",
105
+ "command": "python",
106
+ "args": ["-c", "import os; print(f'Environment: {os.environ.get(\"TEST_ENV\")}')"],
107
+ "expected": {
108
+ "return_code": 0,
109
+ "output_contains": ["Environment: development"]
110
+ }
111
+ },
112
+ {
113
+ "name": "File Comparison Test",
117
114
  "command": "compare-files",
118
115
  "args": ["file1.txt", "file2.txt", "--verbose"],
119
116
  "expected": {
@@ -129,7 +126,22 @@ compare-files binary1.bin binary2.bin --similarity
129
126
  ### YAML Format
130
127
 
131
128
  ```yaml
129
+ setup:
130
+ environment_variables:
131
+ TEST_ENV: "production"
132
+ DATABASE_URL: "sqlite:///test.db"
133
+
132
134
  test_cases:
135
+ - name: Environment Test
136
+ command: python
137
+ args:
138
+ - "-c"
139
+ - "import os; print(f'DB: {os.environ.get(\"DATABASE_URL\")}')"
140
+ expected:
141
+ return_code: 0
142
+ output_contains:
143
+ - "DB: sqlite:///test.db"
144
+
133
145
  - name: Directory Scan Test
134
146
  command: ls
135
147
  args:
@@ -440,6 +452,22 @@ This project is licensed under the MIT License - see the LICENSE file for detail
440
452
 
441
453
  ---
442
454
 
443
- **🚀 Ready to supercharge your testing workflow with parallel execution and advanced file comparison!**
455
+ ## 📚 Complete Documentation
456
+
457
+ For comprehensive documentation including detailed Setup Module guide, API reference, and advanced usage examples, see:
458
+
459
+ **[📖 Complete User Manual](https://github.com/ozil111/cli-test-framework/blob/main/docs/user_manual.md)**
460
+
461
+ The user manual includes:
462
+ - 🔧 **Setup Module**: Complete guide for environment variables and custom plugins
463
+ - 🚀 **Parallel Testing**: Advanced parallel execution strategies
464
+ - 📁 **File Comparison**: Detailed comparison capabilities for all file types
465
+ - 🔌 **API Reference**: Full API documentation and examples
466
+ - 🛠️ **Troubleshooting**: Common issues and solutions
467
+ - 📝 **Best Practices**: Recommended patterns and configurations
468
+
469
+ ---
470
+
471
+ **🚀 Ready to supercharge your testing workflow with setup modules, parallel execution and advanced file comparison!**
444
472
 
445
- 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
  ```
@@ -8,13 +8,13 @@ with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
8
8
 
9
9
  setup(
10
10
  name="cli-test-framework",
11
- version="0.3.1",
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.1"
8
+ __version__ = "0.3.3"
9
9
  __author__ = "Xiaotong Wang"
10
10
  __email__ = "xiaotongwang98@gmail.com"
11
11
 
@@ -1,3 +1,38 @@
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
+
1
36
  # CLI Testing Framework
2
37
 
3
38
  ## 1. Overview
@@ -7,7 +42,8 @@ This is a lightweight and extensible automated testing framework that supports d
7
42
  ## 2. Features
8
43
 
9
44
  - **🚀 Parallel Test Execution**: Support for multi-threading and multi-processing parallel testing with significant performance improvements
10
- - **🏗️ Modular Architecture**: Decoupled design of core components (runner/assertion/report)
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)
11
47
  - **📄 Multi-Format Support**: Native support for JSON/YAML test case formats
12
48
  - **🧠 Intelligent Command Parsing**: Smart handling of complex commands like `"python ./script.py"`
13
49
  - **📁 Smart Path Resolution**: Automatic handling of relative and absolute path conversions
@@ -54,6 +90,21 @@ runner = ParallelJSONRunner(
54
90
  success = runner.run_tests()
55
91
  ```
56
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
+
57
108
  ### File Comparison
58
109
 
59
110
  ```bash
@@ -76,9 +127,25 @@ compare-files binary1.bin binary2.bin --similarity
76
127
 
77
128
  ```json
78
129
  {
130
+ "setup": {
131
+ "environment_variables": {
132
+ "TEST_ENV": "development",
133
+ "API_URL": "http://localhost:8080",
134
+ "DEBUG_MODE": "true"
135
+ }
136
+ },
79
137
  "test_cases": [
80
138
  {
81
- "name": "File Comparison Test",
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",
82
149
  "command": "compare-files",
83
150
  "args": ["file1.txt", "file2.txt", "--verbose"],
84
151
  "expected": {
@@ -94,7 +161,22 @@ compare-files binary1.bin binary2.bin --similarity
94
161
  ### YAML Format
95
162
 
96
163
  ```yaml
164
+ setup:
165
+ environment_variables:
166
+ TEST_ENV: "production"
167
+ DATABASE_URL: "sqlite:///test.db"
168
+
97
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
+
98
180
  - name: Directory Scan Test
99
181
  command: ls
100
182
  args:
@@ -405,6 +487,22 @@ This project is licensed under the MIT License - see the LICENSE file for detail
405
487
 
406
488
  ---
407
489
 
408
- **🚀 Ready to supercharge your testing workflow with parallel execution and advanced file comparison!**
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!**
409
507
 
410
- For detailed parallel testing guide, see: [PARALLEL_TESTING_GUIDE.md](PARALLEL_TESTING_GUIDE.md)
508
+ For detailed parallel testing guide, see: [PARALLEL_TESTING_GUIDE.md](https://github.com/ozil111/cli-test-framework/blob/main/PARALLEL_TESTING_GUIDE.md)