Testing
April 17, 2026 · View on GitHub
Run tests
just test # Stdio JSONL integration test
just test-http # HTTP / SSE integration test
just test-script # IDAPython script execution test
just test-dsc /path/to/dyld_shared_cache_arm64e # DSC loading test
just cargo-test # Unit tests (no IDA required)
All integration tests require IDA Pro with a valid license. Run
cargo build --bin ida-cli first; the test harness then spawns the built
binary as a worker subprocess.
What's Tested
Stdio test (just test)
- MCP protocol handshake
- Tool discovery (
tool_catalog,tool_help) - Database operations (
open_idb,close_idb,get_database_info,get_analysis_status) - Analysis tools (
list_functions,get_function_by_name,disassemble_function,search_instructions,search_instruction_operands) - Editing tools (
set_comment,rename_symbol,patch_bytes,patch_assembly) - Types / stack tools (
declare_c_type,apply_type,infer_type,get_stack_frame,create_stack_variable,delete_stack_variable) - Metadata tools (
list_segments,list_strings,list_imports,list_exports,list_structs,get_xrefs_to_struct_field,search_structs)
HTTP test (just test-http)
- Streamable HTTP transport with SSE
tools/listreturns the full tool list- Database operations work over HTTP (
open_idb,list_functions,close_idbwithclose_token)
Script test (just test-script)
- Opens a binary and runs inline Python via
run_script - Verifies stdout / stderr capture
- Verifies Python error reporting (division by zero)
- Verifies file-based script execution (
.pyfile path)
DSC test (just test-dsc <path>)
- Requires a real
dyld_shared_cache_arm64efile - Tests both sync (pre-existing
.i64) and async (backgroundidat) paths - Polls
get_task_statusuntil completion - Verifies the database is usable after loading (
list_functions)
Unit tests (just cargo-test)
src/dsc.rs— file type strings,idatargs, script generation, Python string escapingsrc/server/task.rs— task registry lifecycle, deduplication, cancellation, ISO timestampsshared/ida_install.rs— install-path normalisation and version parsing
Test Fixture
Tests use test/fixtures/mini.c, a minimal C program compiled into a
Mach-O binary. The integration tests open the raw binary via open_idb;
IDA auto-analyses it and writes an .i64 alongside.