将屏幕视频连接到Allure-Playwright-Reporter上

发布于 2025-01-29 03:27:00 字数 1034 浏览 4 评论 0原文

是否有一种方法可以在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
enter image description here

As you can see under test body, I have trace and screenshot but I also need screen recording.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

以往的大感动 2025-02-05 03:27:00

您应该在此处询问此 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文