将屏幕视频连接到Allure-Playwright-Reporter上
是否有一种方法可以在Allure-PlayWright-Reporter中对每个测试进行屏幕记录。我能够为每个测试捕获屏幕截图,但也希望在仪表板上有屏幕录制。如何实现这一目标?
这是我的playwright.config.js,仅供参考,
/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
use : {
launchOptions: {
devtools: false
},
contextOptions:{
recordVideo: {
dir: "../test-results/videos/"
}
},
testDir: './tests',
headless: false,
viewport: { width: 1280, height: 900 },
channel: "chrome",
screenshot: "on",
video: "on",
trace: "on"
},
testMatch: /traderTest.js/,
retries: 0,
reporter: [["list"], ["json", { outputFile: "test-results.json"}] ,['experimental-allure-playwright']]
};
module.exports = config;
您可以看到测试主体,我有跟踪和屏幕截图,但我还需要屏幕录制。
Is there a way to have screen recording of each test in allure-playwright-reporter. I am able to capture screenshots for each test but also wish to have screen recordings on dashboard. What can be done to achieve this?
This is my playwright.config.js, just for reference
/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
use : {
launchOptions: {
devtools: false
},
contextOptions:{
recordVideo: {
dir: "../test-results/videos/"
}
},
testDir: './tests',
headless: false,
viewport: { width: 1280, height: 900 },
channel: "chrome",
screenshot: "on",
video: "on",
trace: "on"
},
testMatch: /traderTest.js/,
retries: 0,
reporter: [["list"], ["json", { outputFile: "test-results.json"}] ,['experimental-allure-playwright']]
};
module.exports = config;
This is how the dashboard looks like
As you can see under test body, I have trace and screenshot but I also need screen recording.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该在此处询问此 https://github.com/microsoft/microsoft/playwright/sissues 。我认为,他们通常会在该平台上做出回应。
You should ask this here https://github.com/microsoft/playwright/issues. I think, they usually respond on that platform.