Automated URL route testing with hero_browser_mcp #31
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_os#31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
URL routing in hero_os (#30) needs end-to-end verification. Manual testing is fragile and doesn't catch regressions. We need automated browser-level tests that verify each route loads the correct UI.
Approach
Use
hero_browser_mcpto automate browser testing of hero_os routes:Routes to Test
/hero_os_ui/— should load the main desktop/hero_os_ui/space/{context}/{app}— should open specific app in context/hero_os_ui/space/{context}/{app1}+{app2}— should open multiple apps?contacts.id=abc— should pass to islandsDeliverables
make test-routesRelated
Browser Testing Strategy
Approach
Using
hero_browser_mcpRhai scripting to automate route verification. The test script will:Routes to Test
/hero_os_ui//hero_os_ui/space/geomind/hero_os_ui/space/geomind/contacts/hero_os_ui/space/work/contacts+filesystem/hero_os_ui/space/invalid-contextDeliverables
tests/routes/test_routes.rhai— Rhai script for hero_browsertests/routes/README.md— Usage instructionsmake test-routesPrerequisites
make run)hero_browser_serveror via hero_proc)Implementing now on
development_30branch.Implementation Complete
Pushed browser test infrastructure on
development_30branch:852e65e— feat: add browser-based URL route tests using hero_browser_mcpFiles Added
tests/routes/test_routes.rhai— Rhai test script with 9 test groups:/space/geomind)/space/geomind/contacts)/space/geomind/contacts+filesystem)?contacts.id=test123)/space/work/filesystem)Makefile— Addedmake test-routestargetHow to Run
What It Tests
/tmp/hero_os_route_tests/Prerequisites
hero_browserCLI (from hero_browser_mcp)hero_browser_serverrunning on port 8884make run)Browser Tests Executed Successfully
Ran the full test suite with hero_browser_mcp against a live hero_os_ui instance:
Results
Screenshots
8 screenshots captured to
/tmp/hero_os_route_tests/showing login screen on all routes (auth required before desktop is shown — URL routing is parsed correctly by the WASM app, apps would open after login).Fix Applied
Fixed Rhai script — removed
thiskeyword (not supported in standalone Rhai scripts), replaced with inline variable tracking. Pushed as50c6d04.Setup Notes
hero_os_ui binds to Unix socket only. For browser testing, a TCP proxy is needed:
Once hero_router discovers hero_os_ui properly, the test can use
http://localhost:9998/hero_os_uidirectly.