-
Notifications
You must be signed in to change notification settings - Fork 0
Attempt to run Android tests in GH action based on NPM #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Ebazhanov <[email protected]>
Co-authored-by: Ebazhanov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR establishes a complete Appium 2 automation testing setup with uiautomator2 driver support for Android automation. It creates a foundational project structure with driver management capabilities and basic test functionality.
Key changes include:
- Complete Appium 2.19.0 setup with uiautomator2 driver v3.10.0 installation
- Driver management scripts and commands for listing and installing drivers
- Basic test implementation demonstrating uiautomator2 functionality with error handling
Reviewed Changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Defines project dependencies (Appium 2.19.0, uiautomator2 driver, WebDriverIO) and NPM scripts for driver management |
| tests/basic-test.js | Implements basic uiautomator2 test with Android Calculator app capabilities and comprehensive error handling |
| scripts/driver-demo.js | Creates interactive demonstration script showing driver management capabilities and current installation status |
| config/capabilities.js | Provides example capability configurations for various Android testing scenarios (basic, app, browser, real device) |
| config/appium.json | Defines Appium server configuration with uiautomator2 driver settings |
| README.md | Comprehensive documentation covering setup, usage, troubleshooting, and driver management |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@copilot rebase with main branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 6 out of 8 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
tests/basic-test.js
Outdated
| 'appium:noReset': true | ||
| }; | ||
|
|
||
| const appiumServerUrl = 'http://localhost:4723/wd/hub'; |
Copilot
AI
Sep 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The appiumServerUrl variable is defined but never used. It's redundant since the same URL is constructed from the individual components in the remote() call. Consider removing this unused variable or using it in the connection setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot can you pls work on this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the server URL configurable via environment variables. Now uses APPIUM_SERVER_URL environment variable with fallback to the default localhost URL. Added .env.example file with all configuration options. Commit 9416355
config/capabilities.js
Outdated
| 'appium:automationName': 'UiAutomator2', | ||
| 'appium:deviceName': 'Android Emulator', | ||
| 'appium:platformVersion': '11.0', | ||
| 'appium:app': '/path/to/your/app.apk', // Path to your APK |
Copilot
AI
Sep 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The placeholder path '/path/to/your/app.apk' should be a more realistic example or use environment variable syntax to indicate it needs to be configured. Consider using something like '${APP_PATH}/your-app.apk' or './apps/sample.apk' to make it clearer this needs customization.
| 'appium:app': '/path/to/your/app.apk', // Path to your APK | |
| 'appium:app': process.env.APP_PATH || './apps/sample.apk', // Set APP_PATH env variable or place APK at ./apps/sample.apk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot can you pls work on it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the app path configuration to use environment variables with a practical fallback. Now supports APP_PATH environment variable or defaults to ./apps/sample-app.apk. Also created an apps directory and .env.example file for better user experience. Commit 9416355
config/capabilities.js
Outdated
| platformName: 'Android', | ||
| 'appium:automationName': 'UiAutomator2', | ||
| 'appium:deviceName': 'Real Device', // Use adb devices to get UDID | ||
| 'appium:udid': 'YOUR_DEVICE_UDID', |
Copilot
AI
Sep 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The placeholder 'YOUR_DEVICE_UDID' should follow a more realistic format or use environment variable syntax. Consider using '${DEVICE_UDID}' or a format that shows what a real UDID looks like (e.g., 'emulator-5554' for emulator or '1A2B3C4D5E6F' for device).
| 'appium:udid': 'YOUR_DEVICE_UDID', | |
| 'appium:udid': '${DEVICE_UDID}', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot can you pls work on this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enhanced the UDID configuration to use environment variables with better instructions. Now supports DEVICE_UDID environment variable with a clear placeholder and instructions to run 'adb devices' to get the actual UDID. Commit 9416355
# Conflicts: # .gitignore # README.md # package.json
Co-authored-by: Ebazhanov <[email protected]>
Ebazhanov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot fyi
config/capabilities.js
Outdated
| 'appium:automationName': 'UiAutomator2', | ||
| 'appium:deviceName': 'Android Emulator', | ||
| 'appium:platformVersion': '11.0', | ||
| 'appium:app': '/path/to/your/app.apk', // Path to your APK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot can you pls work on it
config/capabilities.js
Outdated
| platformName: 'Android', | ||
| 'appium:automationName': 'UiAutomator2', | ||
| 'appium:deviceName': 'Real Device', // Use adb devices to get UDID | ||
| 'appium:udid': 'YOUR_DEVICE_UDID', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot can you pls work on this
tests/basic-test.js
Outdated
| 'appium:noReset': true | ||
| }; | ||
|
|
||
| const appiumServerUrl = 'http://localhost:4723/wd/hub'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot can you pls work on this
Co-authored-by: Ebazhanov <[email protected]>
# Conflicts: # .github/workflows/android-appium.yml
Important:
The Android emulator cannot be run in GitHub Actions CI due to lack of hardware virtualization support on Apple Silicon runners