allure-js
allure-js copied to clipboard
How to add video as an attachment to allure cucumber-js report in BDD cucumber framework
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
I am able to attach screenshots & json files fine
Desktop (please complete the following information):
- Windows 10 -Chrome
-
Additional context Please can you provide quick example how to attach videos in the above scenarios. Thanks in advance