This document provides development commands for working with this project.
Important: Run format and lint checks on every change before committing.
cd tools/imd
composer install
npm installcd tools/imd
npm run formatcd tools/imd
npm run format:checkcd tools/imd
composer testcd tools/imd
composer run test-coverageRodney is a Chrome automation tool used for browser testing.
Important: These instructions are for PowerShell on Windows.
The rodney start command launches Chrome but the connection can drop immediately. The reliable approach is to start Chrome manually with remote debugging:
# Start Chrome with remote debugging and a dedicated profile
Start-Process -FilePath "C:\Program Files\Google\Chrome\Application\chrome.exe" -ArgumentList "--remote-debugging-port=9222","--user-data-dir=C:\temp\chrome-dev"
# Wait for Chrome to fully start
Start-Sleep -Seconds 3
# Connect Rodney to the browser
rodney connect localhost:9222Note: Using
--user-data-dircreates an isolated profile, preventing conflicts with existing Chrome instances.
rodney start # Start Chrome (headless by default)
rodney open <url> # Navigate to a URL
rodney reload # Reload current page
rodney html # Get page HTML
rodney click <selector> # Click an element
rodney input <selector> <text> # Type into an input
rodney screenshot [file] # Take a screenshot
rodney status # Show browser status
rodney stop # Stop Chrome-
Start the PHP development server:
cd tools/imd php -S 127.0.0.1:8080
-
Start Chrome with debugging:
Start-Process -FilePath "C:\Program Files\Google\Chrome\Application\chrome.exe" -ArgumentList "--remote-debugging-port=9222","--user-data-dir=C:\temp\chrome-dev" # Wait for Chrome to start Start-Sleep -Seconds 3
-
Connect Rodney:
rodney connect localhost:9222 -
Navigate to the app:
rodney open "http://127.0.0.1:8080/index.php"
Chrome not responding / connection refused:
- Chrome needs time to start - use
Start-Sleep -Seconds 3after launching - Ensure the port (default 9222) is not already in use
"Browser not responding" after rodney start:
- Use the manual Chrome start method instead (see above)
Check if Chrome is already running:
Get-Process chrome -ErrorAction SilentlyContinue | Select-Object Id,MainWindowTitleKill all Chrome processes if needed:
Get-Process chrome | Stop-Process -ForceUse a different port if 9222 is in use:
Start-Process -FilePath "C:\Program Files\Google\Chrome\Application\chrome.exe" -ArgumentList "--remote-debugging-port=9230"
rodney connect localhost:9230# Stop Chrome via Rodney
rodney stop
# Clean up temp Chrome profile
Remove-Item -Path "C:\temp\chrome-dev" -Recurse -Force -ErrorAction SilentlyContinue- The main project is in
tools/imd/- this is the IMD Postcode Checker - The parent directory contains the main website (principles.md, index.html, etc.)
- PHP minimum version: 8.5
- PHPUnit version: ^10.0
- Formatting: dprint with Mago plugin for PHP