Skip to content

Commit cd16886

Browse files
feat: Support descendant (AppiumTestDistribution#140)
* fix AppiumTestDistribution#126 support for descendant API Co-authored-by: SrinivasanTarget <[email protected]> * RUn all tests Co-authored-by: SrinivasanTarget <[email protected]> * Fix issue on appLaunch Co-authored-by: SrinivasanTarget <[email protected]> * Bump api level for android Co-authored-by: SrinivasanTarget <[email protected]> --------- Co-authored-by: SrinivasanTarget <[email protected]>
1 parent f22a3ee commit cd16886

File tree

35 files changed

+8724
-28911
lines changed

35 files changed

+8724
-28911
lines changed

.circleci/config.yml

Lines changed: 65 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- run:
2828
name: Node Version
2929
command: |
30-
nvm install v20.2.0 && nvm alias default 20.2.0
30+
nvm install v22.2.0 && nvm alias default 22.2.0
3131
- run:
3232
name: Install Appium and Run iOS Test
3333
command: |
@@ -39,16 +39,18 @@ jobs:
3939
echo 'export APP_PATH=$CIRCLE_WORKING_DIRECTORY/ios.zip' >> $BASH_ENV
4040
echo $pwd
4141
echo ls
42-
nvm install v20.2.0 && nvm alias default 20.2.0
42+
nvm install v22.2.0 && nvm alias default 22.2.0
4343
node -v
4444
target_sim_id=$(xcrun simctl list devices available | grep "iPhone 14" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1)
4545
echo $target_sim_id
4646
echo 'export UDID=$target_sim_id' >> $BASH_ENV
4747
xcrun simctl boot $target_sim_id
4848
xcrun simctl bootstatus $target_sim_id -b
4949
npm install -g [email protected]
50-
npm ci
50+
npm run build-flutter-by-service
51+
npm install --no-package-lock
5152
npm run build
53+
appium driver list
5254
appium driver run xcuitest build-wda
5355
wda=$(ls -d /Users/distiller/Library/Developer/Xcode/DerivedData/WebDriverAgent*)
5456
echo $wda
@@ -58,65 +60,65 @@ jobs:
5860
xcrun simctl install $target_sim_id $wda/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app
5961
xcrun simctl launch $target_sim_id "com.facebook.WebDriverAgentRunner.xctrunner"
6062
mkdir appium-logs
61-
git clone https://github.com/AppiumTestDistribution/flutter-finder.git
62-
UDID=$target_sim_id APP_PATH=$ios_app npm run wdio-ios-ci
63+
UDID=$target_sim_id APP_PATH=$ios_app npm run wdio-ios
6364
6465
- store_artifacts:
6566
path: appium-logs
66-
JAVA_IOS:
67-
# Specify the execution environment.
68-
# See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job
69-
# Add steps to the job
70-
# See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
71-
macos:
72-
# Specify the Xcode version you desire here
73-
# See: https://circleci.com/docs/using-macos/
74-
xcode: 15.2.0
75-
steps:
76-
# Checkout the code as the first step.
77-
- checkout
78-
- run: xcrun simctl list devices available
79-
- run:
80-
name: Node Version
81-
command: |
82-
nvm install v20.2.0 && nvm alias default 20.2.0
83-
- run:
84-
name: Install Appium and Run iOS Test
85-
command: |
86-
release_info=$(curl -s https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/releases/latest)
87-
asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4)
88-
ios_app=$(echo "$asset_urls" | tail -n 1)
89-
echo "$ios_app"
90-
curl -LO $ios_app
91-
echo 'export APP_PATH=$CIRCLE_WORKING_DIRECTORY/ios.zip' >> $BASH_ENV
92-
echo $APP_PATH
93-
nvm install v20.2.0 && nvm alias default 20.2.0
94-
node -v
95-
target_sim_id=$(xcrun simctl list devices available | grep "iPhone 14" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1)
96-
echo $target_sim_id
97-
echo 'export UDID=$target_sim_id' >> $BASH_ENV
98-
xcrun simctl boot $target_sim_id
99-
xcrun simctl bootstatus $target_sim_id -b
100-
npm install -g [email protected]
101-
npm ci
102-
npm run build
103-
appium driver run xcuitest build-wda
104-
wda=$(ls -d /Users/distiller/Library/Developer/Xcode/DerivedData/WebDriverAgent*)
105-
echo $wda
106-
echo 'export WDA_PATH=$wda' >> $BASH_ENV
107-
echo ${WDA_PATH}
108-
echo ${PROJECT_ENV_VAR}
109-
xcrun simctl install $target_sim_id $wda/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app
110-
xcrun simctl launch $target_sim_id "com.facebook.WebDriverAgentRunner.xctrunner"
111-
mkdir appium-logs
112-
git clone https://github.com/AppiumTestDistribution/flutter-finder.git
113-
cd flutter-finder/flutter-by/java
114-
UDID=$target_sim_id APP_PATH=$ios_app Platform=ios ./gradlew clean test --debug
67+
# JAVA_IOS:
68+
# # Specify the execution environment.
69+
# # See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job
70+
# # Add steps to the job
71+
# # See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
72+
# macos:
73+
# # Specify the Xcode version you desire here
74+
# # See: https://circleci.com/docs/using-macos/
75+
# xcode: 15.2.0
76+
# steps:
77+
# # Checkout the code as the first step.
78+
# - checkout
79+
# - run: xcrun simctl list devices available
80+
# - run:
81+
# name: Node Version
82+
# command: |
83+
# nvm install v22.2.0 && nvm alias default 22.2.0
84+
# - run:
85+
# name: Install Appium and Run iOS Test
86+
# command: |
87+
# release_info=$(curl -s https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/releases/latest)
88+
# asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4)
89+
# ios_app=$(echo "$asset_urls" | tail -n 1)
90+
# echo "$ios_app"
91+
# curl -LO $ios_app
92+
# echo 'export APP_PATH=$CIRCLE_WORKING_DIRECTORY/ios.zip' >> $BASH_ENV
93+
# echo $APP_PATH
94+
# nvm install v22.2.0 && nvm alias default 22.2.0
95+
# node -v
96+
# target_sim_id=$(xcrun simctl list devices available | grep "iPhone 14" | cut -d "(" -f2 | cut -d ")" -f1 | head -n 1)
97+
# echo $target_sim_id
98+
# echo 'export UDID=$target_sim_id' >> $BASH_ENV
99+
# xcrun simctl boot $target_sim_id
100+
# xcrun simctl bootstatus $target_sim_id -b
101+
# npm install -g [email protected]
102+
# npm install --no-package-lock
103+
# npm run build
104+
# appium driver list
105+
# appium driver run xcuitest build-wda
106+
# wda=$(ls -d /Users/distiller/Library/Developer/Xcode/DerivedData/WebDriverAgent*)
107+
# echo $wda
108+
# echo 'export WDA_PATH=$wda' >> $BASH_ENV
109+
# echo ${WDA_PATH}
110+
# echo ${PROJECT_ENV_VAR}
111+
# xcrun simctl install $target_sim_id $wda/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app
112+
# xcrun simctl launch $target_sim_id "com.facebook.WebDriverAgentRunner.xctrunner"
113+
# mkdir appium-logs
114+
# git clone https://github.com/AppiumTestDistribution/flutter-finder.git
115+
# cd flutter-finder/flutter-by/java
116+
# UDID=$target_sim_id APP_PATH=$ios_app Platform=ios ./gradlew clean test --debug
115117

116-
- store_artifacts:
117-
path: flutter-finder/flutter-by/java/appium.log
118-
# Orchestrate jobs using workflows
119-
# See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows
118+
# - store_artifacts:
119+
# path: flutter-finder/flutter-by/java/appium.log
120+
# # Orchestrate jobs using workflows
121+
# # See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows
120122
workflows:
121123
ios: # This is the name of the workflow, feel free to change it to better match your workflow.
122124
# Inside the workflow, you define the jobs you want to run.
@@ -126,8 +128,8 @@ workflows:
126128
branches:
127129
ignore:
128130
- main
129-
- JAVA_IOS:
130-
filters:
131-
branches:
132-
ignore:
133-
- main
131+
# - JAVA_IOS:
132+
# filters:
133+
# branches:
134+
# ignore:
135+
# - main

.github/workflows/main.yml

Lines changed: 75 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
api-level: [29]
10+
api-level: [35]
1111
target: [google_apis]
1212
steps:
1313
- name: Check out my other private repo
@@ -41,7 +41,8 @@ jobs:
4141
sudo udevadm trigger --name-match=kvm
4242
- name: Linting
4343
run: |
44-
npm install
44+
npm run build-flutter-by-service
45+
npm install --no-package-lock
4546
npm run prettier-check
4647
- name: Build Driver
4748
run: |
@@ -50,11 +51,6 @@ jobs:
5051
run: |
5152
npm install -g [email protected]
5253
appium driver list
53-
- name: Checkout Test from Flutter Finder
54-
uses: actions/checkout@v2
55-
with:
56-
repository: AppiumTestDistribution/flutter-finder
57-
path: finder
5854
- name: run tests
5955
uses: reactivecircus/android-emulator-runner@v2
6056
with:
@@ -65,97 +61,86 @@ jobs:
6561
script: |
6662
echo ${{ env }}
6763
adb devices
68-
node --version
69-
echo ${{ github.workspace }}
70-
ls ${{ github.workspace }}/finder -R
7164
appium driver list
72-
mkdir ${{ github.workspace }}/appium-logs
65+
mkdir ${{ github.workspace }}/appium-logs
7366
adb logcat > ${{ github.workspace }}/appium-logs/flutter.txt &
7467
echo $android_app
75-
APP_PATH=${{ env.APP_PATH }} npm run wdio-android-ci
68+
APP_PATH=${{ env.APP_PATH }} npm run wdio-android
7669
# appium server -pa=/wd/hub & wait-on http://127.0.0.1:4723/wd/hub/status &&
7770
- name: upload appium logs
7871
if: always()
7972
uses: actions/upload-artifact@v4
8073
with:
8174
name: appium-logs
8275
path: ${{ github.workspace }}/appium-logs
83-
Android_E2E_JAVA:
84-
runs-on: ubuntu-latest
85-
strategy:
86-
matrix:
87-
api-level: [ 29 ]
88-
target: [ google_apis ]
89-
steps:
90-
- name: Check out my other private repo
91-
uses: actions/checkout@master
92-
- name: Set up JDK 17
93-
uses: actions/setup-java@v3
94-
with:
95-
java-version: '17'
96-
distribution: 'adopt'
97-
- name: Setup Android SDK
98-
uses: android-actions/[email protected]
76+
# Android_E2E_JAVA:
77+
# runs-on: ubuntu-latest
78+
# strategy:
79+
# matrix:
80+
# api-level: [ 29 ]
81+
# target: [ google_apis ]
82+
# steps:
83+
# - name: Check out my other private repo
84+
# uses: actions/checkout@master
85+
# - name: Set up JDK 17
86+
# uses: actions/setup-java@v3
87+
# with:
88+
# java-version: '17'
89+
# distribution: 'adopt'
90+
# - name: Setup Android SDK
91+
# uses: android-actions/[email protected]
9992

100-
- name: 'List files'
101-
run: |
102-
release_info=$(curl -s https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/releases/latest)
103-
asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4)
104-
android_app=$(echo "$asset_urls" | head -n 1)
105-
echo "$android_app"
106-
ios_app=$(echo "$asset_urls" | tail -n 1)
107-
echo "$ios_app"
108-
curl -LO $android_app
109-
ls ${{ github.workspace }}
110-
echo "APP_PATH=${{ github.workspace }}/app-debug.apk" >> $GITHUB_ENV
111-
- uses: actions/setup-node@v4
112-
with:
113-
node-version: 20
114-
- name: Enable KVM group perms
115-
run: |
116-
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
117-
sudo udevadm control --reload-rules
118-
sudo udevadm trigger --name-match=kvm
119-
- name: Linting
120-
run: |
121-
npm install
122-
npm run prettier-check
123-
- name: Build Driver
124-
run: |
125-
npm run build
126-
- name: Install Drivers
127-
run: |
128-
npm install -g [email protected]
129-
appium driver list
130-
- name: Checkout Test from Flutter Finder
131-
uses: actions/checkout@v2
132-
with:
133-
repository: AppiumTestDistribution/flutter-finder
134-
path: finder
135-
- name: run tests
136-
uses: reactivecircus/android-emulator-runner@v2
137-
with:
138-
working-directory: ${{ github.workspace }}/finder/flutter-by/java
139-
api-level: ${{ matrix.api-level }}
140-
target: ${{ matrix.target }}
141-
arch: x86_64
142-
profile: Nexus 6
143-
script: |
144-
echo ${{ env }}
145-
adb devices
146-
node --version
147-
echo ${{ github.workspace }}
148-
ls ${{ github.workspace }}/finder -R
149-
appium driver list
150-
mkdir ${{ github.workspace }}/appium-logs
151-
adb logcat > ${{ github.workspace }}/appium-logs/flutter.txt &
152-
echo $android_app
153-
ls
154-
APP_PATH=${{ env.APP_PATH }} Platform=android ./gradlew clean test
155-
# appium server -pa=/wd/hub & wait-on http://127.0.0.1:4723/wd/hub/status &&
156-
- name: upload appium logs
157-
if: always()
158-
uses: actions/upload-artifact@v4
159-
with:
160-
name: appium-logs-java
161-
path: ${{ github.workspace }}/finder/flutter-by/java/appium.log
93+
# - name: 'List files'
94+
# run: |
95+
# release_info=$(curl -s https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/releases/latest)
96+
# asset_urls=$(echo "$release_info" | grep "browser_download_url" | cut -d '"' -f 4)
97+
# android_app=$(echo "$asset_urls" | head -n 1)
98+
# echo "$android_app"
99+
# ios_app=$(echo "$asset_urls" | tail -n 1)
100+
# echo "$ios_app"
101+
# curl -LO $android_app
102+
# ls ${{ github.workspace }}
103+
# echo "APP_PATH=${{ github.workspace }}/app-debug.apk" >> $GITHUB_ENV
104+
# - uses: actions/setup-node@v4
105+
# with:
106+
# node-version: 20
107+
# - name: Enable KVM group perms
108+
# run: |
109+
# echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
110+
# sudo udevadm control --reload-rules
111+
# sudo udevadm trigger --name-match=kvm
112+
# - name: Linting
113+
# run: |
114+
# npm install --no-package-lock
115+
# npm run prettier-check
116+
# - name: Build Driver
117+
# run: |
118+
# npm run build
119+
# - name: Install Drivers
120+
# run: |
121+
# npm install -g [email protected]
122+
# appium driver list
123+
# - name: run tests
124+
# uses: reactivecircus/android-emulator-runner@v2
125+
# with:
126+
# api-level: ${{ matrix.api-level }}
127+
# target: ${{ matrix.target }}
128+
# arch: x86_64
129+
# profile: Nexus 6
130+
# script: |
131+
# echo ${{ env }}
132+
# adb devices
133+
# node --version
134+
# appium driver list
135+
# mkdir ${{ github.workspace }}/appium-logs
136+
# adb logcat > ${{ github.workspace }}/appium-logs/flutter.txt &
137+
# echo $android_app
138+
# ls
139+
# APP_PATH=${{ env.APP_PATH }} Platform=android ./gradlew clean test
140+
# # appium server -pa=/wd/hub & wait-on http://127.0.0.1:4723/wd/hub/status &&
141+
# - name: upload appium logs
142+
# if: always()
143+
# uses: actions/upload-artifact@v4
144+
# with:
145+
# name: appium-logs-java
146+
# path: ${{ github.workspace }}/finder/flutter-by/java/appium.log

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/setup-node@v4
1212
with:
1313
node-version: 20
14-
- run: npm install
14+
- run: npm install --no-package-lock
1515
name: Install dependencies
1616
- run: npm run build
1717
name: Build

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ yarn-debug.log*
1111
yarn-error.log*
1212
lerna-debug.log*
1313
.pnpm-debug.log*
14-
flutter-finder
14+
flutter-finder/wdio-flutter-by-service/node_modules
15+
flutter-finder/wdio-flutter-by-service/package-lock.json
16+
flutter-finder/wdio-flutter-by-service/build
17+
flutter-finder/wdio-flutter-by-service/test
18+
flutter-finder/wdio-flutter-by-service/appium-logs
19+
package-lock.json
1520
# Diagnostic reports (https://nodejs.org/api/report.html)
1621
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
1722

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ flutter-by/wdio-flutter-by-service/package.json
66
flutter-by/wdio-flutter-by-service/package-lock.json
77
*.conf.ts
88
CHANGELOG.md
9+
test/*.png

0 commit comments

Comments
 (0)