allure-js icon indicating copy to clipboard operation
allure-js copied to clipboard

How to add video as an attachment to allure cucumber-js report in BDD cucumber framework

Open samplehub opened this issue 1 year ago • 1 comments

Describe the bug How to add video as an attachement to allure cucumber-js report.

To Reproduce Steps to reproduce the behavior: Create BDD cucumber Playwright framework Add allure-reporter . Ref : https://github.com/allure-framework/allure-js/blob/master/packages/allure-cucumberjs/README.md Create Hooks.ts file where the tests are invoked from a context with record video parameter

Before Hooks this.context = await global.browser.newContext({ storageState: path.join(workingDir, test/testData/storageStates/xyz.json), recordVideo: { dir: ${global.videosPath}/${global.testName} }

After Hooks this.attach(${global.videosPath}/${global.testName}, 'video/webm');

Expected behaviour Shall be able to add and play videos as an attachment in BDD framework .

Screenshots Empty video files are attached to the report image I am able to attach screenshots & json files fine
image

Desktop (please complete the following information):

  • Windows 10 -Chrome
  • image

Additional context Please can you provide quick example how to attach videos in the above scenarios. Thanks in advance

samplehub avatar Apr 04 '23 12:04 samplehub