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

Dashboard module #994

Merged
merged 42 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
af7af8d
Add private submodule
saikrishna321 Jan 22, 2024
dd95b04
initial submodule test
saikrishna321 Jan 22, 2024
7390394
update submodule to latest
saikrishna321 Jan 22, 2024
c251a24
minify entire project
sudharsan-selvaraj Jan 22, 2024
d4bcee3
use webpack to create a single bundle file
sudharsan-selvaraj Jan 22, 2024
c246a71
use javascript-obfuscator
sudharsan-selvaraj Jan 22, 2024
06ebd5b
use laoder file to export class from webpack build
sudharsan-selvaraj Jan 22, 2024
c8772c4
Dynamically generate the loader file
sudharsan-selvaraj Jan 22, 2024
ed7cf28
separate build and bundle command
sudharsan-selvaraj Jan 22, 2024
2e61f84
Add webpack sourcemap
sudharsan-selvaraj Jan 23, 2024
e2882bf
update submodule
sudharsan-selvaraj Jan 24, 2024
1ed6c78
remove submodule
sudharsan-selvaraj Jan 24, 2024
53d0f34
update submodules
sudharsan-selvaraj Jan 24, 2024
9706ece
Cleanup dashboard related modules
sudharsan-selvaraj Jan 24, 2024
87dbc78
Merge branch 'main' into submodule
saikrishna321 Feb 1, 2024
1a9d1b3
Merge branch 'main' into submodule
saikrishna321 Feb 1, 2024
5572415
update main
saikrishna321 Feb 1, 2024
8869231
add eventEmittery2
saikrishna321 Feb 2, 2024
f358d9a
Testing submodule checkout
saikrishna321 Feb 4, 2024
91e6e00
Testing submodule checkout
saikrishna321 Feb 4, 2024
c197b66
Testing submodule checkout
saikrishna321 Feb 4, 2024
4c0cd23
Testing submodule checkout
saikrishna321 Feb 4, 2024
5465347
azure submodule
saikrishna321 Feb 4, 2024
d1f0076
azure submodule
saikrishna321 Feb 4, 2024
42d4371
azure submodule
saikrishna321 Feb 4, 2024
f79767e
azure submodule
saikrishna321 Feb 4, 2024
7b5b57c
azure submodule token update
saikrishna321 Feb 4, 2024
f1c2b90
Enable all jobs in pipeline
SrinivasanTarget Feb 4, 2024
44a9e78
Fix pipeline template path
SrinivasanTarget Feb 4, 2024
40007e6
Update pipeline template
SrinivasanTarget Feb 4, 2024
e897e29
merge main
saikrishna321 Feb 5, 2024
f1c91a4
Update test to consider df:options as object and also df: caps
saikrishna321 Feb 5, 2024
bb78c32
move all deviceFarm capabilites to df options
saikrishna321 Feb 6, 2024
1ec3271
updated documentation
saikrishna321 Feb 6, 2024
14ff3a3
update webpack to build without modules directory
sudharsan-selvaraj Feb 6, 2024
0df4e78
Merge branch 'main' into dashboard-module
saikrishna321 Feb 7, 2024
5f439e0
fix ios test
saikrishna321 Feb 7, 2024
8e18f83
add CI stage to build without submodule
saikrishna321 Feb 7, 2024
f46e882
update documentation and test
saikrishna321 Feb 8, 2024
d76f858
update submodule
saikrishna321 Feb 9, 2024
1a81d9e
Update submodule
sudharsan-selvaraj Feb 11, 2024
c9c69dd
use submodule with latest fixes
sudharsan-selvaraj Feb 12, 2024
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
42 changes: 42 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on:
push:
branches:
- dashboard-module

jobs:
buildWithSubmodule:
name: Build with Submodule
runs-on: ubuntu-latest
strategy:
matrix:
node: [18, 20]

steps:
- name: Checkout repository with submodules
uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.PAT_TOKEN }}
- name: Run script
run: |
# Add your script commands here
npm ci
npm run bundle

buildWithOutSubmodule:
name: Build with Out Submodule
runs-on: ubuntu-latest
strategy:
matrix:
node: [18, 20]

steps:
- name: Checkout repository with submodules
uses: actions/checkout@v3
- name: Run script
run: |
npm ci
npm run bundle

3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/modules"]
path = src/modules
url = https://github.com/AppiumTestDistribution/device-farm-pro.git
56 changes: 19 additions & 37 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
trigger:
- main
- dashboard-module

jobs:
- job: UnitTest
- job: UnitTest
pool:
vmImage: 'macOS-latest'

steps:
- task: [email protected]
inputs:
versionSpec: '16.x'

versionSpec: '20.x'
- template: templates/pipeline.yml
- script: |
npm ci
npm test
displayName: 'npm test'
- script: |
npm ci
npm run prettier-check
displayName: 'Prettier check'

Expand All @@ -27,12 +24,8 @@ jobs:
steps:
- task: [email protected]
inputs:
versionSpec: '16.x'

- script: |
npm ci
displayName: 'npm install'

versionSpec: '20.x'
- template: templates/pipeline.yml
- bash: |
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;android-27;google_apis;x86'
displayName: "install Android image"
Expand Down Expand Up @@ -72,9 +65,8 @@ jobs:
- task: [email protected]
inputs:
versionSpec: '16.x'

- template: templates/pipeline.yml
- script: |
npm ci
npm run test-e2e
displayName: 'E2E Test'

Expand All @@ -85,8 +77,8 @@ jobs:
steps:
- task: [email protected]
inputs:
versionSpec: '16.x'

versionSpec: '20.x'
- template: templates/pipeline.yml
- bash: |
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;android-27;google_apis;x86'
displayName: "install Android image"
Expand All @@ -105,8 +97,6 @@ jobs:
$ANDROID_HOME/platform-tools/adb devices
displayName: "start Android emulator"
- script: |
npm ci

npm run test-e2e-hubnode
displayName: 'E2E Hub and Node Test'

Expand All @@ -117,11 +107,9 @@ jobs:
steps:
- task: [email protected]
inputs:
versionSpec: '16.x'

versionSpec: '20.x'
- template: templates/pipeline.yml
- script: |
npm ci

npm run test-e2e-browserstack
displayName: 'E2E Test'

Expand All @@ -132,11 +120,9 @@ jobs:
steps:
- task: [email protected]
inputs:
versionSpec: '16.x'

versionSpec: '20.x'
- template: templates/pipeline.yml
- script: |
npm ci

npm run test-e2e-pcloudy
displayName: 'E2E Test'

Expand All @@ -147,11 +133,9 @@ jobs:
steps:
- task: [email protected]
inputs:
versionSpec: '16.x'

versionSpec: '20.x'
- template: templates/pipeline.yml
- script: |
npm ci

export CLOUD_USERNAME=$BS_USERNAME
export CLOUD_KEY=$BS_PASSWORD
export BS_ANDROID_CLOUD_APP=$BS_ANDROID_CLOUD_APP
Expand All @@ -165,10 +149,9 @@ jobs:
steps:
- task: [email protected]
inputs:
versionSpec: '16.x'

versionSpec: '20.x'
- template: templates/pipeline.yml
- script: |
npm ci
export CLOUD_USERNAME=$BS_USERNAME
export CLOUD_KEY=$BS_PASSWORD
export BS_IOS_CLOUD_APP=$BS_IOS_CLOUD_APP
Expand Down Expand Up @@ -199,10 +182,9 @@ jobs:
steps:
- task: [email protected]
inputs:
versionSpec: '16.x'

versionSpec: '20.x'
- template: templates/pipeline.yml
- script: |
npm ci
export CLOUD_USERNAME=$LT_USERNAME
export CLOUD_KEY=$LT_PASSWORD
export LT_CLOUD_APP=$LT_CLOUD_APP
Expand Down
27 changes: 15 additions & 12 deletions docs/capabilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@
title: Capabilities
---

| Capability Name | Description |
|----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| appium:iPhoneOnly | Allocate only iPhone simulators for execution when to true. Default value is `false`. |
| appium:iPadOnly | Allocate only iPad simulators for execution when to true. Default value is `false`. |
| appium:deviceAvailabilityTimeout | When create session requests are more than available connected devices, plugin waits for a certain interval for device availability before it timeout. Default value is `180000` milliseconds. |
| appium:deviceRetryInterval | When create session requests are more than available connected devices, plugin polls for device availability in certain intervals. Default value is `10000` milliseconds. |
| appium:udids | Comma separated list of device udid's to execute tests only on specific devices `appium:udids: device1UDID,device2UDID` |
| appium:platformName | Requests asession for the provided platform name. Valid options are `iOS`, `tvOS`, or `Android`, ex: `'appium:platformName': tvOS` |
| appium:platformVersion | This capability is used to filter devices/simulators based on SDK. Only devices/simulators that are an exact match with the platformVerson would be considered for test run. `appium:platformVersion` is optional argument. ex: `'appium:platformVersion': 16.1.1` |
| appium:minSDK | This capability is used to filter devices/simulators based on SDK. Devices/Simulators with SDK greater then or equal to minSDK would only be considered for test run. `appium:minSDK` is optional argument. ex: `'appium:minSDK': 15` |
| appium:maxSDK | This capability is used to filter devices/simulators based on SDK. Devices/Simulators with SDK less then or equal to maxSDK would only be considered for test run. `appium:maxSDK` is optional argument. ex: `'appium:maxSDK': 15` |
| appium:filterByHost | This capability is used to filter devices/simulators based on node IP. This will only consider devices from specific node. `host` is optional argument. ex: `'host': '192.168.0.226',` |
| Capability Name | Description |
|------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| df:build | Allocate a build name in dashboard. Default value is `null`. |
| df:record_video | Enable video recording for the session. Default value is `true`. |
| df:iPhoneOnly | Allocate only iPhone simulators for execution when to true. Default value is `false`. |
| df:iPadOnly | Allocate only iPad simulators for execution when to true. Default value is `false`. |
| df:deviceAvailabilityTimeout | When create session requests are more than available connected devices, plugin waits for a certain interval for device availability before it timeout. Default value is `180000` milliseconds. |
| df:deviceRetryInterval | When create session requests are more than available connected devices, plugin polls for device availability in certain intervals. Default value is `10000` milliseconds. |
| df:udids | Comma separated list of device udid's to execute tests only on specific devices `df:udids: device1UDID,device2UDID` |
| appium:platformName | Requests asession for the provided platform name. Valid options are `iOS`, `tvOS`, or `Android`, ex: `'appium:platformName': tvOS` |
| appium:platformVersion | This capability is used to filter devices/simulators based on SDK. Only devices/simulators that are an exact match with the platformVerson would be considered for test run. `appium:platformVersion` is optional argument. ex: `'appium:platformVersion': 16.1.1` |
| df:minSDK | This capability is used to filter devices/simulators based on SDK. Devices/Simulators with SDK greater then or equal to minSDK would only be considered for test run. `df:minSDK` is optional argument. ex: `'appium:minSDK': 15` |
| df:maxSDK | This capability is used to filter devices/simulators based on SDK. Devices/Simulators with SDK less then or equal to maxSDK would only be considered for test run. `df:maxSDK` is optional argument. ex: `'appium:maxSDK': 15` |
| df:filterByHost | This capability is used to filter devices/simulators based on node IP. This will only consider devices from specific node. `df:options` is optional argument. ex: `'filterByHost': '192.168.0.226',` |
| df:options | Set all device farm related capabilities as object. `df:options` is optional argument. ex: `'df:options': { filterByHost: '192.168.0.226', record_video: true },` |
24 changes: 24 additions & 0 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,27 @@ User can block/unblock devices from Dashboard manually. These devices will not b

Once automation picks the device user cannot manually unblock, it's responsible for the automation script.

## Dashboard

To reflect the test status on dashboard.

WDIO
```
await driver.executeScript('devicefarm: setSessionStatus', [
{
status: 'passed', //passed or failed
},
]);
```


To reflect the test name on dashboard.

WDIO
```
await driver.executeScript('devicefarm: setSessionName', [
{
name: 'Test Name',
},
]);
```
Loading
Loading