MCPcopy Create free account
hub / github.com/IBM/mcp-cli / test_advanced_commands

Function test_advanced_commands

diagnostics/cli_command_diagnostic.py:218–248  ·  view source on GitHub ↗

Test more advanced commands if basic ones work.

(config_file="server_config.json")

Source from the content-addressed store, hash-verified

216
217
218def 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
251def run_manual_tests():

Callers 1

mainFunction · 0.85

Calls 1

test_mcp_cli_commandFunction · 0.85

Tested by

no test coverage detected