From f46e8828c39f7872377e7fb045f259f1b1f5d988 Mon Sep 17 00:00:00 2001 From: saikrishna321 Date: Thu, 8 Feb 2024 11:17:35 +0800 Subject: [PATCH] update documentation and test --- docs/setup.md | 24 ++++++++++++++++++++++++ src/modules | 2 +- test/e2e/android/conf.spec.js | 8 ++++---- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/docs/setup.md b/docs/setup.md index aa440cbc0..ba3ea6c65 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -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', + }, + ]); +``` \ No newline at end of file diff --git a/src/modules b/src/modules index 46ce9029b..4fe082c19 160000 --- a/src/modules +++ b/src/modules @@ -1 +1 @@ -Subproject commit 46ce9029bf7e8ebf845fbe5ff3c18aa5350334d8 +Subproject commit 4fe082c19acd284e60edca35ecf9f0e9ef16bd56 diff --git a/test/e2e/android/conf.spec.js b/test/e2e/android/conf.spec.js index 11495057b..ce35d74bd 100644 --- a/test/e2e/android/conf.spec.js +++ b/test/e2e/android/conf.spec.js @@ -13,9 +13,9 @@ const capabilities = { platformName: 'Android', 'appium:uiautomator2ServerInstallTimeout': '50000', 'appium:automationName': 'UIAutomator2', - 'df:build': 'DeviceFarm BuildName 4', + 'df:build': 'DeviceFarm BuildName 66', 'df:options': { - record_video: true, + record_video: false, }, 'appium:app': 'https://github.com/AppiumTestDistribution/appium-demo/blob/main/VodQA.apk?raw=true', @@ -29,14 +29,14 @@ describe('Plugin Test', () => { it('Vertical swipe test', async () => { await driver.executeScript('devicefarm: setSessionName', [{ name: 'DeviceFarm SliderTest' }]); console.log(await driver.capabilities.deviceUDID); - await driver.$('~logins').click(); + await driver.$('~login').click(); }); afterEach(async function () { if (driver) { await driver.executeScript('devicefarm: setSessionStatus', [ { - status: this.currentTest.state, + status: this.currentTest.state, //passed or failed }, ]); await driver.deleteSession();