Updated: 2025-11-18
System Version: 2.0 (Multi-phase with Best Practice Validation)
The Complete UX Tour (complete_ux_tour.py) is an automated end-to-end testing system that validates every screen, feature, and interaction in CalorieAppTestnet. It provides comprehensive analysis with best practice validation across 9 reference domains.
ux_tour.py system with enhanced capabilities.
- 13 Testing Phases covering all app functionality
- Branch Testing for alternative user flows (create vs import, etc.)
- Triple Validation per phase: Functionality β Performance β Appearance
- 9 Reference Domains: Kivy, KivyMD, Material Design 3, UI Guidelines, XRPL, IPFS, BigchainDB, FoodRepo, Bitcoin
- Issue categorization (Functional, Layout, Performance, Errors)
- Best practice validation with reference citations
- Compliance scoring (target >80% per domain)
- Fix recommendations with quick-fix suggestions
- Per-phase analysis reports
docs/ux_tours/{tour_id}/
βββ screenshots/ # Before/after for every action
βββ logs/ # Detailed execution logs
βββ reports/ # Action summaries & metrics
βββ analysis/ # Per-phase analysis + recommendations
βββ phase_1_analysis.json # Machine-readable
βββ phase_1_SUMMARY.md # Human-readable
Branches: create_new, import_existing
Tests: IntroScreen β FirstUseScreen β AccountChoiceScreen β MnemonicDisplayScreen β MnemonicVerifyScreen β FirstAccountSetupScreen β WalletScreen
Branches: single_account, multi_account
Tests: Account creation, switching, naming, management
Tests: Balance display, transaction history, refresh operations
Branches: sendxrp, send_test_tokens, trustlines
Tests:
- SendXRPScreen
- SendTestTokenScreen (CAL, Lipisa)
- AddTrustlineScreen
Tests: NFT minting interface, display gallery, metadata
Tests: DEXTradeScreen, token swaps, order book
Tests: FoodTrackScreen, calorie logging, meal tracking
Branches: qr_scan, barcode_scan
Tests:
- BarcodeScanScreen
- CameraScanScreen
Tests: SettingsScreen, theme switching, preferences
Branches: web3_browser, webview
Tests:
- Web3BrowserScreen
- WebViewScreen
Tests: Touch targets (48dp), contrast, screen readers, responsive layouts
Tests: Connection failover, retry logic, offline handling
Tests: App restart, data recovery, wallet database integrity
Tests: Comprehensive compliance report, final recommendations
# Run one phase
python -B scripts/complete_ux_tour.py
# Review analysis
cat docs/ux_tours/tour_*/analysis/phase_*_SUMMARY.md
# Fix high-priority issues
# (see recommendations in analysis)
# Run next phase
python -B scripts/complete_ux_tour.py# Enable visual window (slower but visible)
$env:TOUR_VISUAL="1"
python -B scripts/complete_ux_tour.py
# Disable for faster headless execution
$env:TOUR_VISUAL="0"
python -B scripts/complete_ux_tour.py# Add 0.4s delay between actions for manual observation
$env:TOUR_SLOWMO="1"
python -B scripts/complete_ux_tour.py# Force phone-sized window (414x896 - iPhone 11 DP)
$env:TOUR_FORCE_PHONE="1"
$env:TOUR_PHONE_WIDTH="414"
$env:TOUR_PHONE_HEIGHT="896"
python -B scripts/complete_ux_tour.py# Log to file with timestamp
python -B scripts/complete_ux_tour.py 2>&1 | Tee-Object -FilePath "ux_tour_$(Get-Date -Format 'yyyyMMdd_HHmmss').log"Each phase generates compliance scores:
- Overall Compliance: >80% target
- UI/UX: Material Design 3 adherence
- XRPL: Transaction reliability
- Performance: Response times <3s
- Accessibility: Touch targets, contrast
# Phase 1 - Analysis Summary
## π Compliance Scorecard
- **Overall Compliance:** 85.2%
- **UI/UX Compliance:** 88.0%
- **XRPL Best Practices:** 90.5%
- **Performance:** 78.3%
- **Accessibility:** 82.1%
## Required Fixes
### π΄ High Priority
- **Issue description**
- Recommendation: Specific fix
- Reference: `docs/reference/file.md#section`
- Quick Fixes: [actionable steps]- Review Analysis:
cat docs/ux_tours/tour_*/analysis/phase_1_SUMMARY.md - Prioritize: Focus on π΄ High Priority issues
- Implement: Use reference citations and quick fixes
- Verify: Re-run phase to confirm fixes
- Continue: Proceed to next phase when compliance >80%
- β All 13 phases executed
- β Overall compliance >80%
- β No HIGH severity issues
- β All critical screens tested
- β All branches covered
Validation checks reference:
docs/reference/kivy_best_practices.mddocs/reference/kivymd_best_practices.mddocs/reference/material_design3_best_practices.mddocs/reference/ui_guidelines.mddocs/reference/xrpl_best_practices.mddocs/reference/ipfs_best_practices.mddocs/reference/bigchaindb_best_practices.mddocs/reference/foodrepo_api_best_practices.mddocs/reference/bitcoin_dev_resources.md
The original ux_tour.py is still available for quick validation:
- Add Trustline: Currency/issuer inputs, limit field
- NFT Mint: URI and taxon inputs
- DEX Trade: Screen rendering and content
- Create/Import Wallet: Navigation and button presence
- Import Choice: Mnemonic vs keypair selection
- Keypair Import: Public/private key inputs and validation
- Account Choice: Create vs import account options
- Wallet Setup: Initial setup flow
- Mnemonic Verify: 12-word verification fields
- Import Extra Keys: Additional keypair import
- Food Track: Screen rendering
- Mnemonic Display: Recovery phrase and key display
- Mnemonic Import: 12-word import fields
- First Use: Password creation
- Login: Password entry and validation
- Wallet Offline: Balance shows "Offline Mode", trustlines show offline message
- SendXRP Offline: Balance and transaction list show offline state
- Token Send Offline: Offline state handling
- Trustline Offline: Form accessibility in offline mode
- DEX Offline: Screen accessibility in offline mode
The UX tour runs automatically on:
- Pull requests to
main - Pushes to
main - Manual workflow dispatch
Configuration: .github/workflows/ux_tour.yml
After each run, the following artifacts are uploaded:
ux-tour-report- Test report fileux-tour-screenshots- All captured screenshots
- Go to Actions tab in GitHub
- Select the workflow run
- Scroll to Artifacts section
- Download
ux-tour-reportorux-tour-screenshots
- Create navigation method:
def _to_new_screen(self, dt):
try:
self.app.manager.current = "new_screen_name"
Clock.schedule_once(self._snap_new_screen, 0.5)
except Exception as e:
self.log(f"NewScreen nav failed: {e}")
Clock.schedule_once(self._next_step, 0.2)- Add assertion method:
def _snap_new_screen(self, dt):
try:
scr = self.app.manager.get_screen("new_screen_name")
# Test header
self.test("NewScreen header exists",
lambda: scr.ids.get("app_header") is not None)
# Test specific widgets
self.test("NewScreen input field exists",
lambda: scr.ids.get("input_field") is not None)
# Capture screenshot
self.snap("XX_new_screen")
# Chain to next test
Clock.schedule_once(self._next_step, 0.4)
except Exception as e:
self.log(f"NewScreen snap failed: {e}")
Clock.schedule_once(self._next_step, 0.2)- Update test chain: Insert your new methods into the tour sequence
Basic existence check:
self.test("Widget exists", lambda: scr.ids.get("widget_id") is not None)Text validation:
self.test("Label has text", lambda: getattr(scr.ids.get("label"), "text", "") != "")Input field test:
scr.ids["field"].text = "test_value"
self.test("Field accepts input", lambda: scr.ids["field"].text == "test_value")Icon button search:
icons = [w for w in scr.walk() if hasattr(w, 'icon') and w.icon == 'icon-name']
self.test("Icon button exists", lambda: len(icons) > 0)Dialog validation:
self.test("Dialog opened", lambda: hasattr(scr, "dialog") and scr.dialog is not None)- Missing ID: Add
id: widget_nameto the KV file - Wrong screen name: Check screen registration in
app.py - Timing issues: Increase delay in
Clock.schedule_once - Dynamic content: Use container checks instead of child counts
- Check the uploaded test report artifact
- Review screenshots to identify visual issues
- Run locally to reproduce:
python scripts/ux_tour.py
"No Screen with name X": Screen not registered in app.py or name mismatch Widget not found: Check KV file for correct ID assignment Test timeout: Network issues or slow rendering; increase delays
- Add IDs: Every testable widget needs a unique
idin KV - Standardize names: Use snake_case for screen names consistently
- Chain gracefully: Always provide fallback in exception handlers
- Screenshot strategically: Capture before and after user actions
- Test incrementally: Add tests one screen at a time and validate
- Full tour runs in ~30-45 seconds
- Generates ~100+ screenshots
- Report size: ~5KB
- Screenshot total: ~50-100MB
- Add tests for new screens as they're implemented
- Update assertions when UI changes
- Keep screenshot baselines for visual regression testing
- Commit test reports for baseline comparison
- Use
.gitignoreto exclude screenshots (optional) - Tag significant test coverage milestones