Automated testing framework for Obsidian mobile app using AI-powered agents.
# 1. Extract and enter directory
tar -xzf mobile-qa-agent.tar.gz
cd mobile-qa-agent
# 2. Run interactive setup
./setup_interactive.sh
# 3. Validate everything is working
python validate_setup.py
# 4. Run tests!
python main.pyFor detailed step-by-step instructions, see QUICKSTART.md
mobile-qa-agent/
├── main.py # Entry point
├── agents/
│ ├── __init__.py
│ ├── planner.py # Plans test actions
│ ├── executor.py # Executes actions via ADB
│ └── supervisor.py # Verifies results
├── tools/
│ ├── __init__.py
│ ├── adb_tools.py # ADB controller
│ └── state_detection.py # UI state detection
├── tests/
│ ├── __init__.py
│ ├── test_definitions.py # Test case definitions
│ └── test_runner.py # Test orchestration
└── requirements.txt
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables: Create a
.envfile with:GEMINI_API_KEY=your_api_key_here -
Ensure ADB is installed:
- Install Android SDK Platform Tools
- Connect your device or start an emulator
- Verify with:
adb devices
-
Install Obsidian on your device/emulator
python main.pypython main.py --test 1 # Test 1: Create Vault
python main.py --test 2 # Test 2: Create Note
python main.py --test 3 # Test 3: Appearance Tab (should fail)
python main.py --test 4 # Test 4: Print to PDF (should fail)python main.py --allpython main.py --passingpython main.py --device emulator-5554- Opens Obsidian
- Creates a new vault named 'InternVault'
- Handles permissions and sync setup
- Creates a note titled 'Meeting Notes'
- Adds content: 'Daily Standup'
- Prerequisite: Test 1 must be completed
- Expected to FAIL
- Checks if Appearance tab icon is red (it's not - it's purple)
- Tests negative validation
- Expected to FAIL
- Looks for Print to PDF feature (doesn't exist in mobile)
- Tests missing feature detection
- Lenient State Verification: Actions don't fail on state mismatches
- API Quota Handling: Uses gemini-2.5-flash for higher limits
- Automatic Retries: Configurable retry logic for flaky steps
- Screenshot Capture: Full visual documentation of test execution
- Detailed Reports: Comprehensive test execution reports
All coordinates are for Pixel 6 Pro (1440x3120) resolution.
Quick Fix:
# Create .env file with your API key
echo "GEMINI_API_KEY=your_actual_key_here" > .env
# Verify it was created
cat .envGet API Key:
- Visit: https://aistudio.google.com/app/apikey
- Click "Create API Key"
- Copy and paste into .env file
Still not working?
# Run validation script
python validate_setup.py
# Or set environment variable directly
export GEMINI_API_KEY="your_key_here"
python main.pyMake sure all files are in the correct directory structure as shown above.
The system uses gemini-2.5-flash which has higher quota limits. If you still hit limits, wait 30-60 seconds between test runs.
The supervisor is lenient - state detection failures won't cause test failures unless it's a verify action.
adb kill-server
adb start-server
adb devices- Test results:
artifacts/Test_X_*.json - Screenshots:
artifacts/screenshots/ - Execution logs: Console output
- Tests 1 and 2 are designed to PASS
- Tests 3 and 4 are designed to FAIL (negative testing)
- The system is lenient with state verification to avoid false failures
- Coordinates are hardcoded for reliability