【发布时间】:2022-06-25 07:23:36
【问题描述】:
我希望能够指定我的测试所在的文件夹,这样 Playwright 就不会尝试从所有文件夹运行测试。有没有办法告诉 Playwright 只从特定文件夹运行测试?
【问题讨论】:
标签: javascript testing integration-testing playwright
我希望能够指定我的测试所在的文件夹,这样 Playwright 就不会尝试从所有文件夹运行测试。有没有办法告诉 Playwright 只从特定文件夹运行测试?
【问题讨论】:
标签: javascript testing integration-testing playwright
您可以使用testDir 配置选项执行此操作。例如:
// playwright.config.ts
import { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
testDir: './tests/playwright',
};
export default config;
【讨论】: