From d07d472ee851d46fa096d98da51edd0489c7f689 Mon Sep 17 00:00:00 2001 From: Dmitry Sotnikov Date: Mon, 22 Nov 2021 13:22:28 +0200 Subject: [PATCH] added wdio-video-reporter for failed spec video recording --- appium/config/wdio.shared.conf.js | 11 +++++++---- appium/package.json | 1 + appium/tests/specs/login/GmailLogin.spec.ts | 1 - 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/appium/config/wdio.shared.conf.js b/appium/config/wdio.shared.conf.js index 644cf1408..e7c51621a 100644 --- a/appium/config/wdio.shared.conf.js +++ b/appium/config/wdio.shared.conf.js @@ -1,4 +1,5 @@ const { join } = require('path'); +const video = require('wdio-video-reporter'); exports.config = { @@ -16,11 +17,13 @@ exports.config = { connectionRetryTimeout: 90000, connectionRetryCount: 3, maxInstancesPerCapability: 1, - reporters: ['spec', - ['allure', { + reporters: [ + 'spec', + [video, { + saveAllVideos: false, // If true, also saves videos for successful test cases + videoSlowdownMultiplier: 3, // Higher to get slower videos, lower for faster videos [Value 1-100] + videoRenderTimeout: 10, // Max seconds to wait for a video to finish rendering outputDir: './tmp', - disableWebdriverStepsReporting: true, - disableWebdriverScreenshotsReporting: false, }] ], services: [ diff --git a/appium/package.json b/appium/package.json index 7a9a52289..fd699df45 100644 --- a/appium/package.json +++ b/appium/package.json @@ -50,6 +50,7 @@ "request": "^2.88.2", "ts-node": "^10.4.0", "typescript": "^4.4.4", + "wdio-video-reporter": "^3.1.3", "webdriverio": "7.16.4" } } diff --git a/appium/tests/specs/login/GmailLogin.spec.ts b/appium/tests/specs/login/GmailLogin.spec.ts index d5d2987a6..c025ead33 100644 --- a/appium/tests/specs/login/GmailLogin.spec.ts +++ b/appium/tests/specs/login/GmailLogin.spec.ts @@ -27,7 +27,6 @@ describe('LOGIN: ', () => { await MenuBarScreen.clickLogout(); await SplashScreen.checkLoginPage(); - }); }); });