【问题标题】:How do you specify a test folder/path with Playwright?您如何使用 Playwright 指定测试文件夹/路径?
【发布时间】:2022-06-25 07:23:36
【问题描述】:

我希望能够指定我的测试所在的文件夹,这样 Playwright 就不会尝试从所有文件夹运行测试。有没有办法告诉 Playwright 只从特定文件夹运行测试?

【问题讨论】:

    标签: javascript testing integration-testing playwright


    【解决方案1】:

    您可以使用testDir 配置选项执行此操作。例如:

    // playwright.config.ts
    import { PlaywrightTestConfig } from '@playwright/test';
    
    const config: PlaywrightTestConfig = {
      testDir: './tests/playwright',
    };
    export default config;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-07-06
      • 1970-01-01
      • 1970-01-01
      • 2020-04-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多