This guide explains how to test the browser-based inference implementation.
- A modern web browser (Chrome 113+, Firefox 118+, Edge 113+, Safari 16+, Brave 1.52+)
- The extension loaded in developer mode
- Internet connection (for first use only)
- At least 500MB free disk space
- At least 2GB RAM available
Steps:
- Load the extension in your browser
- Open browser console (F12)
- Check for any errors
Expected Result:
- Extension loads without errors
- Extension icon appears in toolbar
- No console errors
Steps:
- Open test.html in your browser
- Hold Shift + drag over a code block
- Observe the loading panel
Expected Result:
- Loading panel appears with "Initializing AI model..." message
- Progress messages appear (downloading, processing)
- Model downloads (~350MB, may take 30-60 seconds)
- After download, explanation appears in floating panel
- No errors in console
Note: This test requires internet connection and may take time depending on your connection speed.
Steps:
- Reload test.html
- Hold Shift + drag over a code block
- Observe response time
Expected Result:
- Model loads from cache (< 2 seconds)
- Processing completes in 2-4 seconds
- Explanation appears in floating panel
- Much faster than first use
Steps:
- Ensure extension is in "Browser-Based" mode (default)
- Open test.html
- Hold Shift + drag over the button element
- Wait for explanation
Expected Result:
- Captures screenshot successfully
- Sends to model worker for processing
- Returns explanation about the button
- Displays cropped image and explanation in panel
Prerequisites:
- Python backend running on http://127.0.0.1:8000
- Ollama with moondream:1.8b model installed
Steps:
- Start Python backend:
python backend.py - Open extension options
- Change "Inference Mode" to "Backend Mode"
- Save settings
- Open test.html
- Hold Shift + drag over code
Expected Result:
- Extension uses backend instead of browser inference
- Sends request to http://127.0.0.1:8000/api
- Returns explanation from Ollama
- Works like v1.0
Steps:
- Open extension options
- Change inference mode
- Change backend URL (if in backend mode)
- Save settings
- Close options
- Reopen options
Expected Result:
- Settings are preserved
- Correct values displayed
Steps:
- Clear browser cache to remove model
- Disconnect from internet
- Try to use extension
Expected Result:
- Error message about model download failure
- Graceful error handling
- User informed to check connection or enable backend mode
Steps:
- Switch to Backend Mode
- Ensure Python backend is NOT running
- Try to use extension
Expected Result:
- Fetch error caught
- Error message displayed to user
- Console shows error details
Steps:
- Open test.html
- Make 3 different selections (button, code, text)
- Check question count
Expected Result:
- First 3 selections work
- After 3rd selection, shows "Limit reached" message
- Must reload page to reset
Steps:
- Test in Chrome
- Test in Firefox
- Test in Edge
- Test in Safari (if on macOS)
- Test in Brave
Expected Result:
- Works consistently across all browsers
- WebGL fallback works in Firefox/Safari (no WebGPU yet)
- No browser-specific errors
Steps:
- Open browser task manager
- Load extension
- Use extension 5 times
- Check memory usage
Expected Result:
- Initial load: ~400-600MB for model
- Subsequent uses: Memory stays stable
- No memory leaks
- Memory released when tabs closed
Prerequisites:
- Model already cached from previous use
Steps:
- Use extension once to cache model
- Disconnect from internet
- Reload page
- Use extension again
Expected Result:
- Works offline using cached model
- No network errors
- Same performance as online
Record these metrics for comparison:
- First use (with download): ___ seconds
- Model initialization: ___ seconds
- Inference time: ___ seconds
- Total time (cached): ___ seconds
- Inference time: ___ seconds
- Total time: ___ seconds
- Speedup = (Backend Time) / (Browser Cached Time)
- Expected: 1.5-2x faster
Document any issues found during testing:
- Issue: [Description]
- Severity: High/Medium/Low
- Reproducible: Yes/No
- Browser: Chrome/Firefox/etc
- Workaround: [If any]
Record your test environment:
- Browser: [Name and version]
- OS: [Operating system]
- GPU: [Graphics card]
- RAM: [Amount of RAM]
- Date: [Test date]
- Try to inject HTML in explanation text
- Verify content is sanitized
- No script execution possible
- Check browser console for CSP violations
- Verify WebAssembly loads correctly
- No inline script errors
Ensure existing functionality still works:
- Screenshot capture
- Coordinate calculation
- Image cropping
- Panel display
- Close button
- Question count limit
- Page reload reset
Verify documentation accuracy:
- README.md instructions work
- Installation steps correct
- Feature descriptions accurate
- Troubleshooting section helpful
- Privacy policy reflects actual behavior
After testing:
- Clear browser cache to remove test models
- Reset extension settings
- Uninstall test extension if desired
Testing Status: [ ] Not Started [ ] In Progress [ ] Complete
Tester: _______________
Date: _______________
Overall Result: [ ] Pass [ ] Fail [ ] Pass with Issues
Notes: