Skip to content

Commit

Permalink
update documentation and test
Browse files Browse the repository at this point in the history
  • Loading branch information
saikrishna321 committed Feb 8, 2024
1 parent 8e18f83 commit f46e882
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
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',
},
]);
```
2 changes: 1 addition & 1 deletion src/modules
8 changes: 4 additions & 4 deletions test/e2e/android/conf.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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();
Expand Down

0 comments on commit f46e882

Please sign in to comment.