https://github.com/alttester/examples-python-android-with-appium-alttrashcat
https://github.com/alttester/examples-python-android-with-appium-alttrashcat
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/alttester/examples-python-android-with-appium-alttrashcat
- Owner: alttester
- Created: 2022-09-05T15:32:24.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2025-04-23T09:47:37.000Z (over 1 year ago)
- Last Synced: 2025-04-23T10:42:24.460Z (over 1 year ago)
- Language: Python
- Size: 630 MB
- Stars: 1
- Watchers: 0
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TrashCat Testing with AltTester® and Appium
This project contains automated tests for the TrashCat game using AltTester® with Appium. The tests validate game functionality through the AltTester® Unity SDK.
## What This Project Contains
- **Page Object Models** (`pages/`): Reusable page objects for different game screens
- **Test Suite** (`tests/`): Automated test cases for the TrashCat game
- **Test Runner Script** (`run_tests_android.sh`): Automated script that starts Appium, installs the app, and runs all tests
## Prerequisites
Before running the tests, you need:
1. **AltTester® Desktop** (version 2.0.0 or later)
- Download from: https://alttester.com/downloads/
- ❗ **Must be running during test execution**
2. **Appium Server Setup**
- Follow the setup guide: https://alttester.com/docs/sdk/latest/pages/alttester-with-appium.html
3. **Python Environment**
- Python 3.x installed
- Dependencies will be installed automatically by the script
## Setup Instructions
### Step 1: Build the TrashCat APK
You need to create an instrumented `TrashCat.apk` file:
1. Clone the TrashCat Unity project with AltTester® Unity SDK:
```bash
git clone --recursive https://github.com/alttester/trashcat.git
```
2. Open the project in Unity
3. Instrument the application using the latest version of AltTester® Unity SDK
- Detailed instrumentation instructions: https://alttester.com/docs/sdk/latest/pages/get-started.html
4. Build the Android APK from Unity
### Step 2: Add the APK to This Project
1. Create an `app` folder in the project root (if it doesn't exist):
```bash
mkdir app
```
2. Copy your instrumented `TrashCat.apk` into the `app/` folder:
```
app/
└── TrashCat.apk
```
## Running the Tests
1. **Start AltTester® Desktop**
- Open the AltTester® Desktop application
2. **Connect Your Android Device or Emulator**
- Ensure your device is connected via USB with USB debugging enabled, OR
- Start an Android emulator
3. **Run the Test Script**
```bash
./run_tests_android.sh
```
### What the Script Does
The `run_tests_android.sh` script automatically:
- Installs/updates all Python dependencies from `requirements.txt`
- Starts the Appium server
- Installs the TrashCat app from the `app/` folder onto your device
- Executes all test cases in the `tests/` folder
- Generates a test report
## Additional Resources
- [AltTester® Documentation](https://alttester.com/docs/sdk/latest/)
- [AltTester® with Appium Guide](https://alttester.com/docs/sdk/latest/pages/alttester-with-appium.html)
- [TrashCat Unity Project](https://github.com/alttester/trashcat)