This guide provides comprehensive testing procedures for the Shell Registry System implemented in Phase 1.
- VS Code with the vscode-mcp-server extension loaded
- MCP client connected to the extension
- Access to the shell tools via MCP protocol
Command: get_workspace_context
Expected Results:
- Returns current working directory
- Shows VS Code workspace folders
- Displays project information from package.json
- Shows 0 active shells initially
- Includes future enhancement notes
Command: execute_shell_command_code
Parameters:
{
"command": "echo Hello World"
}Expected Results:
- Creates shell-1 automatically
- Shows shell type (PowerShell/Command Prompt)
- Returns working directory before/after
- Shows "Completed" status
- Command executes successfully
Command: get_workspace_context
Expected Results:
- Shows 1 active shell (shell-1)
- Shell status should be "idle"
- Shell name should be "shell-1"
Command: execute_shell_command_code
Parameters:
{
"command": "dir",
"shellId": "my-custom-shell"
}Expected Results:
- Creates new shell with custom name
- Should fail with error about shell not existing
- Error message should list available shells
Command: execute_shell_command_code
Parameters:
{
"command": "pwd",
"cwd": "C:\\temp"
}Expected Results:
- Uses existing shell or creates new one
- Changes to specified directory
- Shows directory change in before/after context
Procedure: Create multiple shells by running commands without shellId Expected Results:
- Should allow up to 8 shells maximum
- 9th shell creation should fail with "Maximum number of shells" error
Command: execute_shell_command_code
Parameters:
{
"command": "ping google.com -t",
"background": true
}Expected Results:
- Returns immediately with "Background Command Started"
- Shows shell ID and status
- Command runs in terminal in background
- Note about using list_active_shells to check status
Command: execute_shell_command_code
Parameters:
{
"command": "npm create svelte@latest test-project",
"interactive": true
}Expected Results:
- Uses 45-second timeout instead of 15-second
- If command prompts for input, should timeout with "waiting for input" message
- Should suggest using send_input_to_shell tool
Command: execute_shell_command_code
Parameters:
{
"command": "timeout 20",
"interactive": false
}Expected Results:
- Should timeout after 15 seconds
- Status should show "Timed out"
- Shell should return to "idle" status
Procedure:
- Start a long-running command in background
- Immediately call
get_workspace_contextExpected Results:
- Shell should show "busy" status during execution
- Should show the running command
- After completion, should return to "idle"
Command: execute_shell_command_code
Parameters:
{
"command": "cd C:\\Windows && echo %CD%",
"shellId": "shell-1"
}Expected Results:
- Shell's currentDirectory should update to C:\Windows
- Subsequent calls should remember the directory
- get_workspace_context should show updated directory
Procedure:
- Create several shells
- Wait 5+ minutes without using them
- Check shell status Expected Results:
- Unused shells should be automatically closed
- Only recently used shells should remain
- get_workspace_context should show reduced shell count
Command: execute_shell_command_code
Parameters:
{
"command": "echo test",
"shellId": "nonexistent-shell"
}Expected Results:
- Clear error message about shell not found
- Lists available shells
- Does not create the shell with that name
Procedure: Test with terminal that doesn't support shell integration Expected Results:
- Graceful error handling
- Informative error message about shell integration
- Suggestions for resolution
Procedure: Try to create 9th shell Expected Results:
- Clear error message about maximum limit
- Suggestion to close unused shells
- No shell created
Command: get_workspace_context
Expected Results:
- Shows accurate count of active shells
- Lists all shell IDs and their status
- Correlates with actual shell state
Procedure:
- Set environment variable in shell-1
- Try to access it from shell-2 Expected Results:
- Each shell should have independent environment
- Variables set in one shell should not affect others
Procedure:
- Create shells and run commands
- Restart VS Code
- Check shell status Expected Results:
- Shells should not persist across VS Code restarts
- Fresh start with no active shells
- Clean slate for new session
- All shells create with proper auto-generated IDs (shell-1, shell-2, etc.)
- Maximum 8 shells enforced
- Auto-cleanup after 5 minutes of inactivity
- Proper status tracking (idle, busy, waiting-for-input, crashed)
- Working directory tracking per shell
- Interactive vs background command differentiation
- Clean error messages with helpful suggestions
- Integration with workspace context tool
- Shell integration not available in certain terminals
- Memory leaks from unclosed shells
- Race conditions in shell status updates
- Directory tracking inconsistencies
- Timeout handling edge cases
- Cross-platform shell type detection issues
Once all tests pass, we'll be ready to proceed with:
- Phase 2: Interactive Command Support
- Advanced shell management tools
- Output limiting and safety features
Test Status: Ready for execution Estimated Testing Time: 30-45 minutes for complete test suite Prerequisites: Working VS Code extension with MCP client connection