Match Mania Icon

๏ฟฝ๏ฟฝ Match Mania Testing System

Comprehensive Automated Testing for Developers

Test Match Mania Across All Android Versions

Zero setup required! Automated testing system with automatic Android SDK installation. Test Match Mania across 5 Android versions with comprehensive UI, gameplay, OTA, and performance testing. Screenshots are automatically captured on errors. Works on Linux, macOS, and Windows.

Testing System: v2.0.0 October 2025
5
Android Versions
API 24 to 33
19
Test Cases
Comprehensive Coverage
4
Test Categories
UI, Gameplay, OTA, Performance
100%
Automated
Zero Manual Effort

โœจ Key Features

Perfect for contributors who want to ensure their changes work across all supported Android versions

๐ŸŽฏ

Zero Setup Required

Automatic Android SDK installation

  • Auto-detects platform (Linux/macOS/Windows)
  • Downloads SDK automatically (~460 MB)
  • Installs essential components
  • Configures environment variables
  • Ready to test in 3-5 minutes
๐Ÿ”„

Multi-Version Testing

Test across 5 Android versions automatically

  • Android 7.0 (API 24) - Nougat
  • Android 8.0 (API 26) - Oreo
  • Android 9.0 (API 28) - Pie
  • Android 11 (API 30) - Current
  • Android 13 (API 33) - Tiramisu
๐Ÿ“ฑ

Comprehensive Tests

19 tests across 4 categories

  • UI Tests (7 tests)
  • Gameplay Tests (5 tests)
  • OTA Tests (4 tests)
  • Performance Tests (3 tests)
๐Ÿ“ธ

Smart Screenshots

Automatic capture for debugging

  • Screenshot on every error
  • Key action captures
  • Test completion shots
  • Organized by session
๐Ÿ“Š

Detailed Reports

Professional HTML reports

  • Summary statistics
  • Screenshot gallery
  • Complete test logs
  • Pass/fail metrics
๐ŸŒ

Cross-Platform

Works everywhere out of the box

  • Linux (all distributions)
  • macOS (10.15+)
  • Windows (WSL2/Git Bash)
  • Platform-specific guidance

๐Ÿง Universal Linux Package Manager Support

Automatic dependency installation across all major Linux distributions!

๐ŸŽ‰ Supports 10 Major Package Managers!

The testing system automatically detects your Linux distribution and offers to install all required dependencies (curl, wget, unzip, Java JDK) with a single confirmation. No manual package installation needed!

Debian/Ubuntu Family

apt
  • Ubuntu
  • Debian
  • Linux Mint
  • Pop!_OS
  • elementary OS

Red Hat Family

dnf
  • Fedora
  • RHEL 8+
  • CentOS Stream
  • Rocky Linux
  • AlmaLinux
yum
  • CentOS 7
  • RHEL 7
  • Oracle Linux 7

Arch Family

pacman
  • Arch Linux
  • Manjaro
  • EndeavourOS
  • Garuda Linux

SUSE Family

zypper
  • openSUSE
  • openSUSE Tumbleweed
  • SUSE Linux Enterprise

Independent Distributions

apk Alpine Linux
emerge Gentoo
xbps Void Linux
nix NixOS

Universal Package Manager

brew
  • Homebrew on Linux
  • Works on any distribution
  • Cross-distro package manager

โšก How It Works

  1. Auto-Detection: The script automatically detects your package manager
  2. Dependency Check: Verifies if curl, wget, unzip, and Java JDK are installed
  3. Single Prompt: Asks once if you want to install missing dependencies
  4. Automatic Installation: Runs the appropriate package manager command
  5. Ready to Test: Proceeds with Android SDK installation and testing

~95% Coverage

Covers approximately 95% of all Linux desktop and server installations

Example: Automatic Installation

$ ./install-android-sdk.sh

โ„น Detected platform: linux
โ„น Detected package manager: apt
โš  Missing required tools: java/jdk

Automatically install missing tools? (Y/n): Y

โ„น Installing required tools...
โœ“ Tools installed successfully
โœ“ Android SDK installed successfully!

๐Ÿš€ Quick Start Guide

Get started with testing in just 3 simple steps - no Android SDK setup required!

๐ŸŽ‰ NEW: Automatic Android SDK Installation!

No manual setup required! The testing scripts automatically detect if Android SDK is missing and offer to install it for you. Just run the tests and press Y when prompted.

โœ… Linux โœ… macOS โœ… Windows (WSL/Git Bash) โšก 3-5 minutes

1 Clone the Repository

git clone https://github.com/ssfdre38/match-mania.git
cd match-mania/emulator-testing

2 Run Tests (Automatic Setup!)

./run-comprehensive-tests.sh

โœจ Magic happens here! If Android SDK is not found, the script will automatically:

  • Detect your platform (Linux/macOS/Windows)
  • Offer to download and install Android SDK (~150 MB)
  • Install essential components (platform-tools, emulator)
  • Download system images (~2-4 GB)
  • Configure environment variables
  • Start testing automatically!

โฑ๏ธ First-time setup: 3-8 minutes | Testing duration: 50-75 minutes

3 Review Results

# View HTML report (opens automatically)
reports/test_YYYYMMDD_HHMMSS_report.html

# Check screenshots
ls screenshots/

# Review logs
cat logs/test_YYYYMMDD_HHMMSS.log

๐Ÿ“Š Professional HTML reports with pass/fail rates, screenshot gallery, and complete logs

๐Ÿ’ก Manual SDK Installation (Optional)

Prefer to install Android SDK manually first? Run this command:

./install-android-sdk.sh

This downloads Android SDK (~460 MB total) and configures everything automatically.

๐Ÿ“‹ What Gets Tested

Comprehensive testing across all aspects of the application

๐Ÿ“ฑ

UI Tests

  • App launch verification
  • All UI elements check (14 elements)
  • Portrait layout verification
  • Landscape layout verification
  • Screen rotation testing
  • Button interaction testing
  • Card interaction testing
๐ŸŽฎ

Gameplay Tests

  • Draw card functionality
  • Play card functionality
  • New game button
  • Game state persistence
  • AI turn processing
๐Ÿ”„

OTA Tests

  • Settings accessibility
  • Check for updates functionality
  • Version display verification
  • Update notification system
โšก

Performance Tests

  • App startup time monitoring
  • Memory usage tracking
  • Crash detection

โœ… Automatic Error Handling

When any test fails, the system automatically captures a screenshot, logs the error details, and continues with the next test. All errors are included in the final HTML report with linked screenshots for easy debugging.

๐Ÿ”„ Test Execution Flow

Understanding how the automated testing system works

1 Initialize

  • Create unique test session ID
  • Setup logging infrastructure
  • Build APK if needed (auto-detected)
  • Prepare directories for results

2 For Each Android Version

  • Create or recreate Android Virtual Device (AVD)
  • Start emulator with optimized settings
  • Wait for complete boot (up to 3 minutes)
  • Install the Match Mania APK
  • Run complete test suite
  • Stop and cleanup emulator

โฑ๏ธ Duration: ~10-15 minutes per Android version

3 Test Suite Per Version

  • UI Tests: Verify all elements, layouts, and rotation
  • Gameplay Tests: Test card drawing, playing, and game flow
  • OTA Tests: Verify update checking and notifications
  • Performance Tests: Monitor startup, memory, and crashes

๐Ÿ“ธ Screenshots captured automatically on any error or at key points

4 Cleanup & Report

  • Stop all running emulators
  • Generate professional HTML report
  • Organize screenshots by test session
  • Archive complete logs for reference
  • Open report automatically in browser

Total Testing Time

50-75 minutes

19 tests ร— 5 Android versions = 95 total test executions

โš™๏ธ Configuration

Easy customization via JSON configuration file

๐Ÿ”ข

Android Versions

Enable or disable specific Android versions for testing

{
  "api_level": 30,
  "version": "11",
  "name": "R",
  "enabled": true
}
๐ŸŽฏ

Test Categories

Choose which test categories to run

{
  "ui_tests": { "enabled": true },
  "gameplay_tests": { "enabled": true },
  "ota_tests": { "enabled": true }
}
๐Ÿ“ธ

Screenshot Settings

Configure automatic screenshot capture

{
  "error": true,
  "test_end": true,
  "key_actions": true
}

๐Ÿ“Š Test Results & Outputs

Professional reports, screenshots, and logs for comprehensive analysis

๐Ÿ“„

HTML Reports

Professional test reports with comprehensive statistics

  • Summary statistics (total/passed/failed/errors)
  • Pass rate percentage
  • Screenshot gallery with captions
  • Complete test log
  • Timestamp tracking

๐Ÿ“‚ Location: reports/

๐Ÿ“ธ

Screenshot Gallery

Automatic screenshot capture for debugging

  • Screenshots on every error
  • Test completion shots
  • Key action captures
  • Organized by test session

๐Ÿ“‚ Location: screenshots/
Format: {session}_{test}_{reason}_{timestamp}.png

๐Ÿ“

Detailed Logs

Complete test execution logs for analysis

  • Main test log with all events
  • Emulator-specific logs
  • UI hierarchy dumps
  • Error stack traces

๐Ÿ“‚ Location: logs/

๐Ÿ”ง Troubleshooting Common Issues

Quick solutions to common problems you might encounter

๐Ÿ” Android SDK Not Found

Error: "Android SDK not found!"

Solution: The scripts offer automatic installation! Just press Y when prompted, or manually run:

./install-android-sdk.sh

๐Ÿ–ฅ๏ธ Emulator Won't Start

Common causes and solutions:

  • Another emulator running: adb emu kill
  • Linux - KVM not enabled: Check virtualization in BIOS, add user to kvm group
  • macOS - HAXM not installed: brew install --cask intel-haxm
  • Windows - WSL1: Upgrade to WSL2 for better emulator support

๐Ÿ’ฟ System Image Missing

Solution: Run the setup script or install manually:

# Automatic (recommended)
./setup-system-images.sh

# Manual
sdkmanager "system-images;android-30;google_apis;x86_64"

๐ŸŒ Platform-Specific Issues

๐Ÿง Linux

  • Install KVM: sudo apt install qemu-kvm
  • Add user to kvm group: sudo usermod -aG kvm $USER
  • Log out and back in for group changes to take effect

๐ŸŽ macOS

  • Install HAXM: brew install --cask intel-haxm
  • Grant Terminal full disk access in System Preferences
  • System Preferences โ†’ Security & Privacy โ†’ Privacy โ†’ Full Disk Access

๐ŸชŸ Windows

  • Use WSL2 (not WSL1) for best emulator support
  • Use forward slashes in paths: C:/Android/Sdk
  • Git Bash works but WSL2 is recommended

Still having issues?

Check the complete troubleshooting guide in the README or open an issue on GitHub

โญ Best Practices

Tips for effective testing and quality assurance

๐ŸŽฏ

Before Releases

Always run comprehensive tests before releasing new versions

  • Test on all supported Android versions
  • Review all screenshots for visual issues
  • Check test logs for warnings
  • Verify OTA updates work correctly
๐Ÿ”

Review Results

Thoroughly analyze test outputs for quality assurance

  • Check HTML reports for pass rates
  • Review error screenshots immediately
  • Monitor performance metrics
  • Track issues across versions
๐Ÿ“ฆ

Maintain Tests

Keep your testing infrastructure up to date

  • Update system images periodically
  • Clean old test data (7+ days)
  • Archive important test reports
  • Update test cases as features evolve

๐Ÿ“š Documentation

Complete guides and references to help you get started

๐Ÿ“–

Full Testing Guide

Complete documentation with examples and troubleshooting tips

View README
๐Ÿ”ง

Configuration Reference

Test configuration file with all available options and settings

View Config
๐Ÿ’ป

Source Code

View and modify the testing scripts for your custom needs

Browse Code

๐Ÿค Contributing

Use this testing system to ensure your changes work correctly before submitting pull requests

Before Submitting a Pull Request

  1. Make your changes to the code
  2. Run the comprehensive test suite
  3. Fix any failing tests
  4. Include test results in your PR description
  5. Add screenshots of any UI changes
View on GitHub Testing Documentation