Skip to content
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

Appium Android Github Action Test #1107

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
c8a8a9f
add appium packages
jiji14 Nov 9, 2023
b0faa75
add webdriverIO setting for local e2e test
jiji14 Nov 9, 2023
6a64e6d
add appium capabilities config for IOS
jiji14 Nov 9, 2023
22ea874
add sample test file
jiji14 Nov 9, 2023
6c70b16
Change sample test to check if wdio successfully connects to simulator
jiji14 Nov 9, 2023
c141f8a
Add android test setting
jiji14 Nov 10, 2023
bfa1bd3
add Android selector and detect if device is android or ios
jiji14 Nov 10, 2023
725257d
change config we can set deviceName and platformVersion dynamically
jiji14 Nov 10, 2023
95ffe34
Apply prettier to e2e-tests directory
jiji14 Nov 10, 2023
3dd4e17
Merge remote-tracking branch 'upstream/master' into appium-setting
jiji14 Nov 10, 2023
8333934
Merge branch 'appium-setting' of https://github.com/jiji14/e-mission-…
jiji14 Nov 10, 2023
6e33899
sample test error fix
jiji14 Nov 10, 2023
4656813
Add appium driver package for Android
jiji14 Nov 10, 2023
ee9a58f
Change get deviceName and platformVersion logic
jiji14 Nov 13, 2023
0f0930b
Add appium test script
jiji14 Nov 13, 2023
25bfdd5
Merge branch 'service_rewrite_2023' into appium-setting
jiji14 Nov 16, 2023
161bbbd
change IOS testing setup to download devapp when starting tests
jiji14 Nov 17, 2023
3ee5953
Delete other workflow temporarily for android appium test
jiji14 Nov 22, 2023
745686d
Add android emulator script
jiji14 Nov 22, 2023
a29e5bd
Revert "Delete other workflow temporarily for android appium test"
jiji14 Nov 22, 2023
7b64792
test commit
jiji14 Nov 22, 2023
660d2f1
check sdkmanger setup
jiji14 Nov 22, 2023
471c92b
use android emulator runner library
jiji14 Nov 22, 2023
4a5c1df
Fix android emulator config
jiji14 Nov 22, 2023
34c2bf8
using specific version for emulator
jiji14 Nov 22, 2023
148cfc8
find gradlew file
jiji14 Nov 22, 2023
025f7d6
Add working directory
jiji14 Nov 22, 2023
a159448
add target
jiji14 Nov 22, 2023
e5cc651
downgrade api level
jiji14 Nov 23, 2023
7019610
debug gradle issue
jiji14 Nov 23, 2023
6b4dbd8
set up JDK11 version before testing
jiji14 Nov 23, 2023
81a2217
add appium script
jiji14 Nov 23, 2023
3ee596a
Run appium test script
jiji14 Nov 23, 2023
18e4efa
install packages before running test
jiji14 Nov 24, 2023
d91d7fc
appium wdio version check
jiji14 Nov 24, 2023
622d6d4
fix run appium server
jiji14 Nov 24, 2023
47ae276
Add running test
jiji14 Nov 24, 2023
20b18c4
comment other tests except appium server
jiji14 Nov 24, 2023
1fa32bf
check only versions
jiji14 Nov 24, 2023
46b90a6
set timeout for debugging
jiji14 Nov 24, 2023
b577c0d
add run appium
jiji14 Nov 24, 2023
a3ed942
run appium server in background
jiji14 Nov 25, 2023
9b97c52
add sleep command
jiji14 Nov 25, 2023
88bbb4b
Run appium server
jiji14 Nov 27, 2023
120496b
test commit
jiji14 Nov 27, 2023
0cb5974
test commit
jiji14 Nov 27, 2023
0567316
test
jiji14 Nov 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This is a basic workflow to help you get started with Actions
# This is a basic workflow to help you get started with Actions

name: osx-build-android

Expand Down Expand Up @@ -78,3 +78,41 @@ jobs:
which gradle
gradle --version
npx cordova build android

- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle

- name: Android Emulator Runner
uses: ReactiveCircus/android-emulator-runner@v2
with:
working-directory: ./platforms/android
api-level: 26
target: google_apis
arch: x86_64
ndk: 21.0.6113669
cmake: 3.10.2.4988404
script: ./gradlew connectedCheck --status

- name: Run appium server
shell: bash -l {0}
timeout-minutes: 3
run: |
source setup/activate_native.sh
npx appium --version
npx wdio --version
npx appium &>/dev/null &

- name: Waiting until appium server executed
run: sleep 10
#test
- name: Android appium test run
shell: bash -l {0}
run: |
source setup/activate_native.sh
npx wdio ./e2e-tests/config/android.config.js


3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ www/json
# This is the pattern to check only www directory
# Ignore all
/*
# but don't ignore all the files in www directory
# but don't ignore all the files in www and e2e-tests directory
!/www
!/e2e-tests
20 changes: 20 additions & 0 deletions e2e-tests/config/android.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { getDeviceName, getPlatformVersion } = require('./common');
const { config } = require('./wdio.conf');
const { join } = require('path');

config.capabilities = [
{
// The defaults you need to have in your config
platformName: 'Android',
maxInstances: 1,
// For W3C the appium capabilities need to have an extension prefix
// This is `appium:` for all Appium Capabilities which can be found here
// http://appium.io/docs/en/writing-running-appium/caps/
'appium:deviceName': getDeviceName('Android'),
'appium:platformVersion': getPlatformVersion('Android'),
'appium:automationName': 'UiAutomator2',
'appium:app': join(process.cwd(), './platforms/android/app/build/outputs/apk/debug/app-debug.apk'),
},
];

exports.config = config;
21 changes: 21 additions & 0 deletions e2e-tests/config/common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* get Device Name from script
* @param platform iOS or Android
*/
const getDeviceName = (platform) => {
const deviceName = process.argv.find((arg) => arg.includes('--deviceName'));
const defaultDeviceName = platform === 'iOS' ? 'iPhone 13' : 'Pixel 3a API 33';
return deviceName ? deviceName.split('=')[1] : defaultDeviceName;
};

/**
* get Platform Version from script
* @param platform iOS or Android
*/
const getPlatformVersion = (platform) => {
const platformVersion = process.argv.find((arg) => arg.includes('--platformVersion'));
const defaultPlatformVersion = platform === 'iOS' ? '15.0' : '13';
return platformVersion ? platformVersion.split('=')[1] : defaultPlatformVersion;
};

module.exports = { getDeviceName, getPlatformVersion };
21 changes: 21 additions & 0 deletions e2e-tests/config/ios.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const { getDeviceName, getPlatformVersion } = require('./common');
const { config } = require('./wdio.conf');
const { join } = require('path');

// Appium capabilities
config.capabilities = [
{
// The defaults you need to have in your config
platformName: 'iOS',
maxInstances: 1,
// For W3C the appium capabilities need to have an extension prefix
// This is `appium:` for all Appium Capabilities which can be found here
// http://appium.io/docs/en/writing-running-appium/caps/
'appium:deviceName': getDeviceName('iOS'),
'appium:platformVersion': getPlatformVersion('iOS'),
'appium:automationName': 'XCUITest',
// it may change once we finalize our target app
'appium:app': join(process.cwd(), './apps/em-devapp.app'),
},
];
exports.config = config;
Loading