cli-test-framework 0.4.0__tar.gz → 0.4.1__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.
- {cli_test_framework-0.4.0/src/cli_test_framework.egg-info → cli_test_framework-0.4.1}/PKG-INFO +16 -1
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/README.md +15 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/setup.py +1 -1
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/core/execution.py +7 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/core/test_case.py +6 -2
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/core/types.py +10 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/runners/json_runner.py +2 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/runners/parallel_json_runner.py +13 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/runners/yaml_runner.py +2 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1/src/cli_test_framework.egg-info}/PKG-INFO +16 -1
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/MANIFEST.in +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/docs/user_manual.md +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/pyproject.toml +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/setup.cfg +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/__init__.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/cli.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/commands/__init__.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/commands/compare.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/core/__init__.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/core/assertions.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/core/base_runner.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/core/parallel_runner.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/core/process_worker.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/core/setup.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/file_comparator/__init__.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/file_comparator/base_comparator.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/file_comparator/binary_comparator.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/file_comparator/csv_comparator.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/file_comparator/factory.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/file_comparator/h5_comparator.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/file_comparator/json_comparator.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/file_comparator/result.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/file_comparator/text_comparator.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/file_comparator/xml_comparator.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/runners/__init__.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/utils/__init__.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/utils/path_resolver.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/utils/report_generator.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework.egg-info/SOURCES.txt +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework.egg-info/dependency_links.txt +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework.egg-info/entry_points.txt +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework.egg-info/requires.txt +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework.egg-info/top_level.txt +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/README.md +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/__init__.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/__pycache__/__init__.cpython-312.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/__pycache__/__init__.cpython-39.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/__pycache__/conftest.cpython-312-pytest-7.4.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/__pycache__/conftest.cpython-39-pytest-8.3.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/__pycache__/run_all.cpython-312.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/__pycache__/run_all.cpython-39.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/__pycache__/test_parallel_runner.cpython-312-pytest-7.4.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/__pycache__/test_setup_module.cpython-312-pytest-7.4.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/conftest.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/demos/h5_filter_demo.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/demos/manual_report_example.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/demos/perf_parallel.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/e2e/__init__.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/e2e/__pycache__/__init__.cpython-312.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/e2e/__pycache__/__init__.cpython-39.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/e2e/__pycache__/test_user_flows.cpython-312-pytest-7.4.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/e2e/__pycache__/test_user_flows.cpython-39-pytest-8.3.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/e2e/test_user_flows.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/fixtures/test_cases.json +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/fixtures/test_cases.yaml +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/fixtures/test_cases1.json +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/fixtures/test_with_setup.json +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/fixtures/test_with_setup.yaml +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/integration/file_compare/__pycache__/test_binary_compare.cpython-312-pytest-7.4.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/integration/file_compare/__pycache__/test_binary_compare.cpython-39-pytest-8.3.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/integration/file_compare/__pycache__/test_h5_compare.cpython-312-pytest-7.4.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/integration/file_compare/__pycache__/test_h5_compare.cpython-39-pytest-8.3.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/integration/file_compare/__pycache__/test_json_compare.cpython-312-pytest-7.4.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/integration/file_compare/__pycache__/test_json_compare.cpython-39-pytest-8.3.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/integration/file_compare/__pycache__/test_text_compare.cpython-312-pytest-7.4.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/integration/file_compare/__pycache__/test_text_compare.cpython-39-pytest-8.3.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/integration/file_compare/test_binary_compare.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/integration/file_compare/test_h5_compare.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/integration/file_compare/test_json_compare.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/integration/file_compare/test_text_compare.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/integration/parallel/__pycache__/test_parallel_runner.cpython-312-pytest-7.4.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/integration/parallel/__pycache__/test_parallel_runner.cpython-39-pytest-8.3.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/integration/parallel/test_parallel_runner.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/integration/path_handling/__pycache__/test_spaces_in_paths.cpython-312-pytest-7.4.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/integration/path_handling/__pycache__/test_spaces_in_paths.cpython-39-pytest-8.3.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/integration/path_handling/test_spaces_in_paths.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/run_all.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/test_report.txt +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/unit/core/__pycache__/test_setup.cpython-312-pytest-7.4.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/unit/core/__pycache__/test_setup.cpython-39-pytest-8.3.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/unit/core/test_setup.py +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/unit/runners/__pycache__/test_json_yaml_runner.cpython-312-pytest-7.4.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/unit/runners/__pycache__/test_json_yaml_runner.cpython-39-pytest-8.3.4.pyc +0 -0
- {cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/unit/runners/test_json_yaml_runner.py +0 -0
{cli_test_framework-0.4.0/src/cli_test_framework.egg-info → cli_test_framework-0.4.1}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cli-test-framework
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: A powerful command line testing framework in Python with setup modules, parallel execution, and file comparison capabilities.
|
|
5
5
|
Home-page: https://github.com/ozil111/cli-test-framework
|
|
6
6
|
Author: Xiaotong Wang
|
|
@@ -53,6 +53,7 @@ This is a lightweight and extensible automated testing framework that supports d
|
|
|
53
53
|
- **📊 Comprehensive Reports**: Detailed pass rate statistics and failure diagnostics
|
|
54
54
|
- **🔧 Thread-Safe Design**: Robust concurrent execution with proper synchronization
|
|
55
55
|
- **📝 Advanced File Comparison**: Support for comparing various file types (text, binary, JSON, HDF5) with detailed diff output
|
|
56
|
+
- **🎛️ Resource-Aware Scheduling**: Per-test timeout and resource hints (estimated time / memory / priority) with LPT-based ordering in parallel runs to improve throughput and avoid long-tail blocking
|
|
56
57
|
|
|
57
58
|
## 3. Quick Start
|
|
58
59
|
|
|
@@ -144,6 +145,20 @@ compare-files binary1.bin binary2.bin --similarity
|
|
|
144
145
|
"output_contains": ["Environment: development"]
|
|
145
146
|
}
|
|
146
147
|
},
|
|
148
|
+
{
|
|
149
|
+
"name": "Full_Car_Crash_Simulation",
|
|
150
|
+
"command": "radioss_solver",
|
|
151
|
+
"args": ["-i", "input.0000.rad"],
|
|
152
|
+
"timeout": 36000,
|
|
153
|
+
"resources": {
|
|
154
|
+
"estimated_time": 18000,
|
|
155
|
+
"min_memory_mb": 16000,
|
|
156
|
+
"priority": 10
|
|
157
|
+
},
|
|
158
|
+
"expected": {
|
|
159
|
+
"return_code": 0
|
|
160
|
+
}
|
|
161
|
+
},
|
|
147
162
|
{
|
|
148
163
|
"name": "File Comparison Test",
|
|
149
164
|
"command": "compare-files",
|
|
@@ -18,6 +18,7 @@ This is a lightweight and extensible automated testing framework that supports d
|
|
|
18
18
|
- **📊 Comprehensive Reports**: Detailed pass rate statistics and failure diagnostics
|
|
19
19
|
- **🔧 Thread-Safe Design**: Robust concurrent execution with proper synchronization
|
|
20
20
|
- **📝 Advanced File Comparison**: Support for comparing various file types (text, binary, JSON, HDF5) with detailed diff output
|
|
21
|
+
- **🎛️ Resource-Aware Scheduling**: Per-test timeout and resource hints (estimated time / memory / priority) with LPT-based ordering in parallel runs to improve throughput and avoid long-tail blocking
|
|
21
22
|
|
|
22
23
|
## 3. Quick Start
|
|
23
24
|
|
|
@@ -109,6 +110,20 @@ compare-files binary1.bin binary2.bin --similarity
|
|
|
109
110
|
"output_contains": ["Environment: development"]
|
|
110
111
|
}
|
|
111
112
|
},
|
|
113
|
+
{
|
|
114
|
+
"name": "Full_Car_Crash_Simulation",
|
|
115
|
+
"command": "radioss_solver",
|
|
116
|
+
"args": ["-i", "input.0000.rad"],
|
|
117
|
+
"timeout": 36000,
|
|
118
|
+
"resources": {
|
|
119
|
+
"estimated_time": 18000,
|
|
120
|
+
"min_memory_mb": 16000,
|
|
121
|
+
"priority": 10
|
|
122
|
+
},
|
|
123
|
+
"expected": {
|
|
124
|
+
"return_code": 0
|
|
125
|
+
}
|
|
126
|
+
},
|
|
112
127
|
{
|
|
113
128
|
"name": "File Comparison Test",
|
|
114
129
|
"command": "compare-files",
|
|
@@ -8,7 +8,7 @@ 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.4.
|
|
11
|
+
version="0.4.1",
|
|
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.",
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/core/execution.py
RENAMED
|
@@ -29,6 +29,7 @@ def execute_single_test_case(case: TestCaseData, workspace: Optional[str] = None
|
|
|
29
29
|
"""
|
|
30
30
|
start_time = time.time()
|
|
31
31
|
full_command = f"{case['command']} {' '.join(case['args'])}".strip()
|
|
32
|
+
timeout_limit = case.get("timeout", 3600)
|
|
32
33
|
|
|
33
34
|
result: TestResultData = {
|
|
34
35
|
"name": case["name"],
|
|
@@ -48,6 +49,7 @@ def execute_single_test_case(case: TestCaseData, workspace: Optional[str] = None
|
|
|
48
49
|
text=True,
|
|
49
50
|
check=False,
|
|
50
51
|
shell=True,
|
|
52
|
+
timeout=timeout_limit if timeout_limit is not None else None,
|
|
51
53
|
)
|
|
52
54
|
|
|
53
55
|
output = process.stdout + process.stderr
|
|
@@ -56,6 +58,11 @@ def execute_single_test_case(case: TestCaseData, workspace: Optional[str] = None
|
|
|
56
58
|
|
|
57
59
|
validate_result(case["expected"], result)
|
|
58
60
|
result["status"] = "passed"
|
|
61
|
+
except subprocess.TimeoutExpired as exc:
|
|
62
|
+
result["status"] = "timeout"
|
|
63
|
+
result["message"] = f"Timeout reached! Killed after {timeout_limit} seconds."
|
|
64
|
+
result["output"] = (exc.stdout or "") + (exc.stderr or "")
|
|
65
|
+
result["return_code"] = None
|
|
59
66
|
except AssertionError as exc:
|
|
60
67
|
result["message"] = str(exc)
|
|
61
68
|
except Exception as exc:
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/core/test_case.py
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
|
-
from typing import List, Dict, Any
|
|
2
|
+
from typing import List, Dict, Any, Optional
|
|
3
3
|
|
|
4
4
|
@dataclass
|
|
5
5
|
class TestCase:
|
|
@@ -8,6 +8,8 @@ class TestCase:
|
|
|
8
8
|
args: List[str]
|
|
9
9
|
expected: Dict[str, Any]
|
|
10
10
|
description: str = ""
|
|
11
|
+
timeout: Optional[float] = None
|
|
12
|
+
resources: Optional[Dict[str, Any]] = None
|
|
11
13
|
|
|
12
14
|
def to_dict(self) -> Dict[str, Any]:
|
|
13
15
|
"""Convert test case to dictionary format"""
|
|
@@ -17,5 +19,7 @@ class TestCase:
|
|
|
17
19
|
"name": self.name,
|
|
18
20
|
"command": self.command,
|
|
19
21
|
"args": self.args,
|
|
20
|
-
"expected": self.expected
|
|
22
|
+
"expected": self.expected,
|
|
23
|
+
"timeout": self.timeout,
|
|
24
|
+
"resources": self.resources,
|
|
21
25
|
}
|
|
@@ -9,6 +9,14 @@ class ExpectedResult(TypedDict, total=False):
|
|
|
9
9
|
output_matches: Optional[str]
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
class ResourceRequirements(TypedDict, total=False):
|
|
13
|
+
"""Optional resource hints for scheduling."""
|
|
14
|
+
|
|
15
|
+
estimated_time: float # seconds, used for ordering (LPT)
|
|
16
|
+
min_memory_mb: float # soft hint to avoid OOM
|
|
17
|
+
priority: int # higher value => higher priority
|
|
18
|
+
|
|
19
|
+
|
|
12
20
|
class TestCaseData(TypedDict):
|
|
13
21
|
"""Input data shape for a test case after解析/路径处理."""
|
|
14
22
|
|
|
@@ -17,6 +25,8 @@ class TestCaseData(TypedDict):
|
|
|
17
25
|
args: List[str]
|
|
18
26
|
expected: ExpectedResult
|
|
19
27
|
description: Optional[str]
|
|
28
|
+
timeout: Optional[float]
|
|
29
|
+
resources: Optional[ResourceRequirements]
|
|
20
30
|
|
|
21
31
|
|
|
22
32
|
class SetupConfig(TypedDict):
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/runners/json_runner.py
RENAMED
|
@@ -45,6 +45,8 @@ class JSONRunner(BaseRunner):
|
|
|
45
45
|
"args": case.args,
|
|
46
46
|
"expected": case.expected,
|
|
47
47
|
"description": case.description or None,
|
|
48
|
+
"timeout": case.timeout,
|
|
49
|
+
"resources": case.resources,
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
command_preview = f"{case_data['command']} {' '.join(case_data['args'])}".strip()
|
|
@@ -47,6 +47,17 @@ class ParallelJSONRunner(ParallelRunner):
|
|
|
47
47
|
self.test_cases.append(TestCase(**case))
|
|
48
48
|
|
|
49
49
|
print(f"Successfully loaded {len(self.test_cases)} test cases")
|
|
50
|
+
|
|
51
|
+
# Heuristic scheduling: longest estimated time first to improve parallel utilization.
|
|
52
|
+
if self.test_cases:
|
|
53
|
+
print("Optimizing execution order based on estimated duration...")
|
|
54
|
+
self.test_cases.sort(
|
|
55
|
+
key=lambda c: (c.resources or {}).get("estimated_time", 0),
|
|
56
|
+
reverse=True,
|
|
57
|
+
)
|
|
58
|
+
top_case = self.test_cases[0]
|
|
59
|
+
top_est = (top_case.resources or {}).get("estimated_time", 0)
|
|
60
|
+
print(f"Heaviest task: {top_case.name} (Est: {top_est}s)")
|
|
50
61
|
except Exception as e:
|
|
51
62
|
sys.exit(f"Failed to load configuration file: {str(e)}")
|
|
52
63
|
|
|
@@ -58,6 +69,8 @@ class ParallelJSONRunner(ParallelRunner):
|
|
|
58
69
|
"args": case.args,
|
|
59
70
|
"expected": case.expected,
|
|
60
71
|
"description": case.description or None,
|
|
72
|
+
"timeout": case.timeout,
|
|
73
|
+
"resources": case.resources,
|
|
61
74
|
}
|
|
62
75
|
|
|
63
76
|
command_preview = f"{case_data['command']} {' '.join(case_data['args'])}".strip()
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/runners/yaml_runner.py
RENAMED
|
@@ -44,6 +44,8 @@ class YAMLRunner(BaseRunner):
|
|
|
44
44
|
"args": case.args,
|
|
45
45
|
"expected": case.expected,
|
|
46
46
|
"description": case.description or None,
|
|
47
|
+
"timeout": case.timeout,
|
|
48
|
+
"resources": case.resources,
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
command_preview = f"{case_data['command']} {' '.join(case_data['args'])}".strip()
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1/src/cli_test_framework.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cli-test-framework
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: A powerful command line testing framework in Python with setup modules, parallel execution, and file comparison capabilities.
|
|
5
5
|
Home-page: https://github.com/ozil111/cli-test-framework
|
|
6
6
|
Author: Xiaotong Wang
|
|
@@ -53,6 +53,7 @@ This is a lightweight and extensible automated testing framework that supports d
|
|
|
53
53
|
- **📊 Comprehensive Reports**: Detailed pass rate statistics and failure diagnostics
|
|
54
54
|
- **🔧 Thread-Safe Design**: Robust concurrent execution with proper synchronization
|
|
55
55
|
- **📝 Advanced File Comparison**: Support for comparing various file types (text, binary, JSON, HDF5) with detailed diff output
|
|
56
|
+
- **🎛️ Resource-Aware Scheduling**: Per-test timeout and resource hints (estimated time / memory / priority) with LPT-based ordering in parallel runs to improve throughput and avoid long-tail blocking
|
|
56
57
|
|
|
57
58
|
## 3. Quick Start
|
|
58
59
|
|
|
@@ -144,6 +145,20 @@ compare-files binary1.bin binary2.bin --similarity
|
|
|
144
145
|
"output_contains": ["Environment: development"]
|
|
145
146
|
}
|
|
146
147
|
},
|
|
148
|
+
{
|
|
149
|
+
"name": "Full_Car_Crash_Simulation",
|
|
150
|
+
"command": "radioss_solver",
|
|
151
|
+
"args": ["-i", "input.0000.rad"],
|
|
152
|
+
"timeout": 36000,
|
|
153
|
+
"resources": {
|
|
154
|
+
"estimated_time": 18000,
|
|
155
|
+
"min_memory_mb": 16000,
|
|
156
|
+
"priority": 10
|
|
157
|
+
},
|
|
158
|
+
"expected": {
|
|
159
|
+
"return_code": 0
|
|
160
|
+
}
|
|
161
|
+
},
|
|
147
162
|
{
|
|
148
163
|
"name": "File Comparison Test",
|
|
149
164
|
"command": "compare-files",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/commands/__init__.py
RENAMED
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/commands/compare.py
RENAMED
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/core/__init__.py
RENAMED
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/core/assertions.py
RENAMED
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/core/base_runner.py
RENAMED
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/core/parallel_runner.py
RENAMED
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/core/process_worker.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/runners/__init__.py
RENAMED
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/utils/__init__.py
RENAMED
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework/utils/path_resolver.py
RENAMED
|
File without changes
|
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework.egg-info/requires.txt
RENAMED
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/src/cli_test_framework.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/__pycache__/__init__.cpython-312.pyc
RENAMED
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/__pycache__/__init__.cpython-39.pyc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/__pycache__/run_all.cpython-312.pyc
RENAMED
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/__pycache__/run_all.cpython-39.pyc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/e2e/__pycache__/__init__.cpython-312.pyc
RENAMED
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/e2e/__pycache__/__init__.cpython-39.pyc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cli_test_framework-0.4.0 → cli_test_framework-0.4.1}/tests/unit/runners/test_json_yaml_runner.py
RENAMED
|
File without changes
|