Test more advanced commands if basic ones work.
(config_file="server_config.json")
| 216 | |
| 217 | |
| 218 | def test_advanced_commands(config_file="server_config.json"): |
| 219 | """Test more advanced commands if basic ones work.""" |
| 220 | print("\n" + "=" * 50) |
| 221 | print("🧪 Testing Advanced Commands") |
| 222 | print("=" * 50) |
| 223 | |
| 224 | advanced_tests = [ |
| 225 | (["ping", "--config-file", config_file], "Ping servers"), |
| 226 | (["cmd", "--help"], "Command mode help"), |
| 227 | ] |
| 228 | |
| 229 | results = [] |
| 230 | for args, description in advanced_tests: |
| 231 | print(f"\n📝 {description}") |
| 232 | success, stdout, stderr = test_mcp_cli_command(args, timeout=20) |
| 233 | |
| 234 | if success: |
| 235 | print(f"✅ PASS: {description}") |
| 236 | if stdout and "help" not in args: |
| 237 | lines = stdout.strip().split("\n")[:2] |
| 238 | for line in lines: |
| 239 | if line.strip(): |
| 240 | print(f" 📄 {line[:80]}...") |
| 241 | else: |
| 242 | print(f"❌ FAIL: {description}") |
| 243 | if stderr: |
| 244 | print(f" Error: {stderr[:200]}...") |
| 245 | |
| 246 | results.append((description, success)) |
| 247 | |
| 248 | return results |
| 249 | |
| 250 | |
| 251 | def run_manual_tests(): |
no test coverage detected