Vision-based Intelligent Screen Test Automation — OCR and icon-based mobile UI testing for iOS and Android
Project description
VISTA — Vision-based Intelligent Screen Test Automation
VISTA is an open-source framework for robust, maintainable mobile app testing. Instead of brittle selectors (IDs, XPaths, accessibility-ids), VISTA automates apps the way a human tester does: by looking at the screen.
The Problem
Traditional mobile automation (Appium, XCUITest, Espresso) relies on element locators:
- Resource IDs:
com.example.app:id/login_button - XPaths:
//XCUIElementTypeButton[@name="Login"] - Accessibility IDs:
LoginButton
Every time the app layout changes, tests break — even though the screen looks identical to a human.
The Solution
VISTA combines OCR, icon detection, and fuzzy matching to find elements visually:
# test_login.yaml
steps:
- tap: "Login" # Find and tap the "Login" text
- type: "user@example.com" # Type into the focused field
into: "Email"
- tap: "Password"
- type: "secret123"
into: "Password"
- tap: "Sign In"
- wait: 2 # Wait for navigation
- assert_visible: "Welcome" # Verify success
Run it with:
vista run test_login.yaml --platform ios
No brittle selectors. No test maintenance when the UI changes. Tests that read like human actions.
Features
- OCR-based element detection — PaddleOCR by default, EasyOCR as a fallback
- Icon/non-text element detection — template matching (Stage 4), ML-based later
- Fuzzy text matching — handles OCR noise and minor text variations
- Raw coordinate actions — taps/swipes work on the actual pixels, not the accessibility tree
- Pluggable providers — swap OCR, icon detection, and reporting backends
- Structured YAML DSL — human-readable test instructions designed for future AI generation
- Simulator support — iOS (via Appium + WebDriverAgent), Android later (via Appium + UiAutomator2)
- Beautiful HTML reports — annotated screenshots with detected elements and action history
Project Status
VISTA is in early alpha (Stage 0 scaffolding). The architecture is solid and designed for a 5+ year lifespan, but core functionality (Stages 1-3) is still being built.
See CONTRIBUTING.md for the roadmap and development workflow.
Getting Started
Prerequisites
- Python 3.9+
- Appium 2.x (for device control)
- iOS Simulator or physical iOS device
Installation
git clone https://github.com/yourusername/vista-mobile.git
cd vista-mobile
pip install -e ".[dev]"
Run Tests Locally
# Unit tests (fast, no device required)
pytest tests/unit -v
# Vision provider tests (real OCR/icon detection, ~30s)
pytest tests -m vision -v
# Simulator integration tests (requires booted simulator, slow)
pytest tests -m simulator -v
Write Your First Test
-
Boot an iOS Simulator:
xcrun simctl boot "iPhone 14"
-
Start the Appium server:
appium
-
Create
test_hello.yaml:steps: - wait_until_visible: "Home"
-
Run it (coming in Stage 1-3):
vista run test_hello.yaml --platform ios
Architecture
VISTA is built on a clean, pluggable architecture:
Screenshot
↓
Perception (OCR + icon detection)
↓
ScreenState (detected text + icons)
↓
Matcher (resolve "Login" → bounding box)
↓
Executor (tap, type, swipe via coordinates)
↓
Report (HTML with annotated screenshots)
Every stage is swappable:
- OCRProvider: PaddleOCR, EasyOCR, Google Vision, cloud services
- IconDetector: template matching, ML models, embedding-based
- ElementMatcher: fuzzy text, semantic similarity, nearest-neighbor
- Reporter: HTML, JSON, JUnit XML
- InstructionPlanner (Stage 9+): LLM/VLM-based AI automation
See the architecture plan for details.
Why This Approach?
- Robust: Tests work even when the UI changes (as long as the text/icons do)
- Maintainable: No brittle locators to update
- Future-proof: AI-generation hooks designed in from the start (Stage 9+)
- Community-friendly: Pure Python, no JS/compilation, easy to extend
Contributing
VISTA is built for the community. See CONTRIBUTING.md for:
- Development setup
- Testing requirements
- The critical rule about not using accessibility locators (see CONTRIBUTING.md#critical-rule)
- PR submission guidelines
Roadmap
- Stage 0 (now): Project scaffolding ✅
- Stage 1: iOS driver + screenshot pipeline
- Stage 2: OCR + visual debugging
- Stage 3: DSL parser + basic actions
- Stage 4: Icon detection
- Stage 5: Gestures + assertions
- Stage 6: Reporting
- Stage 7: OSS packaging + release
- Stage 8+: Android support
- Stage 9+: AI-powered automatic test generation
License
Apache 2.0 — see LICENSE for details.
Support
- 📖 Documentation (coming Stage 7)
- 🐛 Report issues
- 💬 Discussions
- 📧 Email us (coming later)
Built with ❤️ by the VISTA community. Let's make mobile testing bulletproof.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vista_mobile-0.1.0.tar.gz.
File metadata
- Download URL: vista_mobile-0.1.0.tar.gz
- Upload date:
- Size: 70.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
989c482d134674ad3bb7392a4a8fad3ad712a0806fd84be9e4b418c350c01d7e
|
|
| MD5 |
f8be0944ba8f28131c8c1d65ad1e4461
|
|
| BLAKE2b-256 |
c1e6a9efda1df0c85eb05966427316630ff6d9313a4925d93dcc93867915bac4
|
File details
Details for the file vista_mobile-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vista_mobile-0.1.0-py3-none-any.whl
- Upload date:
- Size: 51.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa441769edef96f026ed63e0387702f7b2ffaba2a89bb6eb935d6640eb51e5ad
|
|
| MD5 |
de5d017c499e16a16ce6f689322440b5
|
|
| BLAKE2b-256 |
b432da89e01e7c9b61713b984eca7d476a4d95131003e66a319855836b7afbfb
|